I figured it out!
I rarely post on forums, but nowadays since I've been working more and more with Linux based servers, and can't stand it when I'm looking for a solution and no one has posted the answer, I have decided to start posting every time I figure something out no matter where I originally looked!
Okay, so here's how I resolved the problem:
1) You will need to edit httpd.conf (I suggest using locate to find yours, since the paths on everyone's systems vary -- try "locate httpd.conf")
2) You will likely find an entry like this:
Code:
<VirtualHost *:80>
ServerName www.yourdomain.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin [email protected]
UserDir disable
</VirtualHost>
3) You'll need to change the above to show this instead:
Code:
<VirtualHost XXX.XX.XXX.XXX:80>
ServerName www.yourdomain.com
DocumentRoot /home/yourdom/public_html
ServerAdmin [email protected]
UserDir disable
</VirtualHost>
2 Things Have Been Changed:
1) Notice the XXX's -- these XXX's will need to be replaced by the IP address that this domain is hosted on (i.e. 123.45.67.89).
2) Notice how the document root has been changed (you'll need to find the document root for your domain specifically, it's usually the first 7 letters of the domain name or username for the account.
Now for the last step. . .either in WHM or in SSH restart apache (i.e. "service httpd restart") -- you *might* get error messages as shown below:
[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost XXX.XX.XXX.XX:80 has no VirtualHosts
[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost XXX.XX.XXX.XX:80 has no VirtualHosts
[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost *:0 has no VirtualHosts
[Wed Jan 06 00:20:07 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
However, these are just warnings, and Apache will still start.
If you want to get rid of the error messages like I did later on, then you'll need to use WHM to define the VirtualHost template for your domains, since WHM writes to httpd.conf too.
The next step (don't know why this was necessary, but it worked):
CLEAR YOUR BROWSER'S CACHE
Final Step:
Create an .htaccess file in the directory that contains your index.html or index.php file, with the following SINGLE line:
Code:
DirectoryIndex index.html index.php
BTW, if you created this file as root in SSH, you'll need to CHOWN the file to your web user (again first 7 letters of the domain name or username), and then CHGRP the file the same way to your web user, so that Apache can access it (kinda weird, since in Plesk, even if root owns the .htaccess file, apache can still access it, but not in cPanel for whatever reason).
Reload the web page (i.e.
www.yoursite.com). . .and you should be in business.
If not, try going directly to a page on your server (i.e. index.html for example), and that will usually force your browser to refresh the content its pulling from the site.
Anyway. . .I hope this helps, and I hope it was thorough enough -- if not, just shoot me a message, and I'll try to help ya out!
-
Eric Gillette