LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Virtual Host issue with apache (https://www.linuxquestions.org/questions/linux-networking-3/virtual-host-issue-with-apache-342468/)

gauge73 07-12-2005 10:19 AM

Virtual Host issue with apache
 
I'm running an apache server at home, and I'm having a problem with virtual hosts. I have two virtual hosts in the config file; fallen-phoenix.com and ash-can.com. When I connect to them internally (using an internal DNS server that resolves to the apache server's internal IP address), they work fine. However, if I try to connect from the outside, it looks in the default directory /apache/htdocs insteady of the directory of the virtual host.

Here is some of my httpd.conf file:

NameVirtualHost www.fallen-phoenix.com
NameVirtualHost www.ash-can.com

<VirtualHost fallen-phoenix.com>
ServerAdmin rana@fallen-phoenix.com
DocumentRoot /apache/fallen-phoenix
ServerName www.fallen-phoenix.com:80
ErrorLog logs/fallen-phoenix.com-error_log
CustomLog logs/fallen-phoenix.com-access_log common
</VirtualHost>
<VirtualHost ash-can.com>
ServerAdmin gauge@ash-can.com
DocumentRoot /apache/ash-can
ServerName www.ash-can.com:80
ErrorLog logs/ash-can.com-error_log
CustomLog logs/ash-can.com-access_log common
</VirtualHost>



What should I do?

david_ross 07-12-2005 02:00 PM

Is this still a problem? I get different pages for both hosts.

You shouldn't need to add the port to the ServerName directive.


All times are GMT -5. The time now is 07:22 AM.