LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache help (https://www.linuxquestions.org/questions/linux-newbie-8/apache-help-304344/)

Fredstar 03-21-2005 12:39 PM

Apache help
 
Hello,

Normally i use webmin or some other type of control to edit my httpd.conf.. However trying to be better at the simple command with no GUI im trying to set up name base virtual host. The problem im having is it allows me to create two host but both names point the the same destination. my server names are both diff, so im not sure whats going on here is a quick example.

NameVirtualHost 192.1680.8:80

<VirtualHost 192.168.0.8:80>
ServerName www.thisdomain.com
DocumentRoot /www/thisdomain/
ServerAdmin Admin@thisdomain.com
</VirtualHost>

<VirtualHost 192.168.0.8:80>
ServerName www.othersite.com
DocumentRoot /www/othersite/
ServerAdmin Admin@othersite.com
</VirtualHost>

and www.thisdomain.com and othersite.com both point to www.thisdomain.com..

Im using FC3, Selinux

and yes all files are chmod 755 and Chcon -t/u correctly

thank you

Technoslave 03-21-2005 01:06 PM

Try,

<VirtualHost *>
ServerName www.othersite.com
DocumentRoot /www/othersite/
ServerAdmin Admin@othersite.com
</VirtualHost>

for your two virtual hosts.

eckertc1 03-21-2005 01:21 PM

try using * instead of the IP. this seems to work for me, the only problem is it still defaults to the first site in the list about 50% of the time. i have a simular post in this forum asking for help.

NameVirtualHost *:80

<VirtualHost *:80>


All times are GMT -5. The time now is 03:27 AM.