Domains always redirect to DocumentRoot

durrban

Registered
Jul 29, 2007
2
0
51
Hello, I'm having trouble getting domains to redirect to the proper directory. Everything is pretty much the default and it seems that everything is in order except for this huge problem. My dns servers are set up correctly and I have played around with this thing for about an hour and still to no avail. Here's my httpd.conf:

------------------------------------------------------------------
NameVirtualHost 208.180.154.91:80

<VirtualHost 208.180.154.91>
ServerAlias www.jonnyhost.com
ServerAdmin [email protected]
DocumentRoot /home/jonnyhos/public_html
ServerName jonnyhost.com

User jonnyhos
Group jonnyhos
BytesLog /usr/local/apache/domlogs/jonnyhost.com-bytes_log
CustomLog /usr/local/apache/domlogs/jonnyhost.com combined
ScriptAlias /cgi-bin/ /home/jonnyhos/public_html/cgi-bin/
</VirtualHost>

-------------------------------------------------------------------------

this is exacly what whm created when I created my account but it's always going to the success page. Anyone know what I need to do to fix this?
 

durrban

Registered
Jul 29, 2007
2
0
51
hmmmm

This is strange, I have a gateway that had the http and dns port forwarded to my webserver. Well I tried hooking straight up to the connection and now it works fine. I must be configuring WHM wrong? for the NameVirtualHost and VirtualHost directives do I use my internal IP or my external IP?
 

jandafields

Well-Known Member
May 6, 2004
435
6
168
USA
cPanel Access Level
Root Administrator
Do not private (internal) IPs in CPanel, that will break stuff. Always use your public (external) IP and just use port forwarding. Of course, in the router, port forward to the private IP. Keep in mind that there are many more than just those 2 ports that CPanel needs to work properly. Are you even using CPanel?