GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Apache Problem (https://gfy.com/showthread.php?t=505793)

alex79 08-19-2005 12:26 PM

Apache Problem
 
All my domains from VirtualHost are redirected to same documentroot (the documentroot of 1st VirtualHost

here is the sample from httpd.conf:

Code:

<VirtualHost *:80>
ServerName site1.com
DocumentRoot /home/www/site1.com
</VirtualHost>

<VirtualHost *:80>
ServerName site2.com
DocumentRoot /home/www/site2.com
</VirtualHost>

But both site1.com and site2.com requests are redirected to /home/www/site1.com

What can be wrong?

psili 08-19-2005 12:29 PM

Hosts file issue?
Or you could try:

ServerAlias site1.com

and ServerAlias site2.com

in each virtual host?

alex79 08-19-2005 12:37 PM

Quote:

Originally Posted by psili
Hosts file issue?
Or you could try:

ServerAlias site1.com

and ServerAlias site2.com

in each virtual host?


i've added ServerAlias site1.com and ServerAlias site2.com in each virtual host but still redirect site2.com to site1.com :(

broke 08-19-2005 12:38 PM

Have you restarted apache since the httpd configuration changes?

broke 08-19-2005 12:39 PM

Post the whole httpd.conf file...

alex79 08-19-2005 12:40 PM

Quote:

Originally Posted by broke
Have you restarted apache since the httpd configuration changes?


sure i've restarted apache

chaze 08-19-2005 12:42 PM

It's acting like domain one is the hostname for the server, and the second host is just directing to the hostname directory. Neither is actually working. :2 cents:

tgpmakers 08-19-2005 12:44 PM

Are u certain you've got defferent .html index files in each directory so you can tell the difference. Are you using different IP addresses for each domain if so are the details the same with bind and apache?

E Guru 08-19-2005 12:47 PM

are you typing www when you visit the site?
add *.domain.com to server alias

alex79 08-19-2005 12:52 PM

Quote:

Originally Posted by E Guru
are you typing www when you visit the site?
add *.domain.com to server alias


ok.. this was wrong.. i've forgeted to add * to the serveralias.. now is working :)


All times are GMT -7. The time now is 02:44 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123