Monday, October 18, 2010

Stupidity example: Whm

So you have this things "WHM" installed. It looks like the default apache page. All you need to do is put things into /usr/local/apache/htdocs/ and you are done right? Override the default script and that's that.

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?


Good questions.

Let's back up

The old way, clearly too difficult



  1. # touch /usr/local/apache/htdocs/index.html
  2. Point your web browser to http://ip/


The new way, clearly easier



  1. Point web browser to http://ip_address/whm
  2. Log in
  3. Click on the 14th icon, "Account Functions" between "Account Information" and "Multi-Account Functions"
  4. Click on the 2nd icon, "Create a New Account"
  5. For the domain, give it the eventual domain you'd like to use
  6. Enter a Username
  7. Enter a Password
  8. Retype the Password
  9. Enter in an email and scroll down to the bottom
  10. Click Create
  11. SSH to the ip address using the new username/password pair
  12. Run touch public_html/index.html
  13. 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.
  14. 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
  15. Save the file
  16. Restart your web browser to clear out your dns cache
  17. 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?

1 comment:

  1. This doesn't have anything to do with WHM - the same steps apply for DirectAdmin, Plesk, etc.

    ReplyDelete

Followers