NO, Bitch, You Are Wrong
If you do this, then you will get a bunch of errors; apache is looking for sys_cpanel or something somewhere. It will not actually feed the index.php file. It will feed a subdirectory and it's content listings. So if you wanted to look at /usr/local/apache/htdocs/mydocs, you will see the contents of the directory, but as soon as you click
on a single file, KABOOM!
How the fuck do you make it work then?
Let's back up
The old way, clearly too difficult
- # touch /usr/local/apache/htdocs/index.html
- Point your web browser to http://ip/
The new way, clearly easier
- Point web browser to http://ip_address/whm
- Log in
- Click on the 14th icon, "Account Functions" between "Account Information" and "Multi-Account Functions"
- Click on the 2nd icon, "Create a New Account"
- For the domain, give it the eventual domain you'd like to use
- Enter a Username
- Enter a Password
- Retype the Password
- Enter in an email and scroll down to the bottom
- Click Create
- SSH to the ip address using the new username/password pair
- Run touch public_html/index.html
- Go to the machine you need to access it on and open up your etc/hosts file. On Windows its c:\%WINDOWS%\system32\etc\hosts, on MacOS and Linux is /etc/hosts.
- Add the domain name you used in the above step and the ip address. This is a temporary mapping so that you can see the empty file
- Save the file
- Restart your web browser to clear out your dns cache
- Enter in the domain you used above
It's so much easier the new way, right?
How did you figure this out?
It took days. Literally. Who would have thought that you needed to create an account through WHM in order to view a php file on the web server? What kind of stupid is this?