LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2008, 07:19 AM   #1
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
apache Error


Hi
i am having a problem with apache i have got to virtual hosts
but when i try opening the link in the web page
the link opens the same page for the 2 links
e.g
http://test.test.am open test.page
http://test1.test.am open test.page
and in the vhost file what i have is
Quote:
<VirtualHost *:80>
ServerName test.test.am
DocumentRoot "/path/folder"
DirectoryIndex index.php
AccessFileName .htaccess
ErrorLog "/etc/httpd/logs/test-frontend.log"
CustomLog "/etc/httpd/logs/test-access.log" combined
Alias /sf "/usr/share/pear/data/symfony/web/sf"
<Directory "/usr/share/pear/data/symfony/web/sf">
AllowOverride All
Allow from All
</Directory>
<Directory "/path/folder">
DirectoryIndex index.php
AllowOverride All
Allow from All
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary
</Directory>
</VirtualHost>
and for the second 1
Quote:
<VirtualHost *:80>
ServerName test1.test.am
DocumentRoot "/path/folder"
DirectoryIndex index.php
AccessFileName .htaccess
ErrorLog "/etc/httpd/logs/test1-frontend.log"
CustomLog "/etc/httpd/logs/test1-access.log" combined
Alias /sf "/usr/share/pear/data/symfony/web/sf"
<Directory "/usr/share/pear/data/symfony/web/sf">
AllowOverride All
Allow from All
</Directory>
<Directory "/path/folder">
DirectoryIndex index.php
AllowOverride All
Allow from All
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary
</Directory>
</VirtualHost>
can someone please explain why 1 get the same page when i open the 2 different links also

apachectl -S
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.2.203 for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server test.test.am (/etc/httpd/conf.d/vhost-test.conf:1)
port 80 namevhost test1.test.am (/etc/httpd/conf.d/vhost-test1.conf:1)
 
Old 11-24-2008, 07:43 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,903

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
Quote:
can someone please explain why 1 get the same page when i open the 2 different links also
They both have the same DocumentRoot (/path/folder). You have to change it for one of the vhosts and also change the "<Directory "/path/folder">" for the same vhost.

Last edited by bathory; 11-24-2008 at 08:31 AM.
 
Old 11-24-2008, 08:03 AM   #3
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
they are not the same paths i just wrote that to show what is in the vhost
both point to different folders
 
Old 11-24-2008, 02:12 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,903

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
Are you sure you have included /etc/httpd/conf.d/vhost-test1.conf in httpd.conf?
Restart apache, clear browser cache (Shift+Reload) and see if you get the other vhost homepage. Or check the logs to see from what referrer apache servers the homepage requested.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache 1.3.27, https url returns error -12263 in Firefox, fatal error (40) in Opera leo22838 Linux - Server 0 04-04-2008 02:51 PM
apache error satish Linux - Networking 3 03-20-2006 02:46 AM
Apache Error (Internal Server Error) dwarf007 Linux - Software 1 07-17-2005 02:16 PM
Apache Error nickmoncrief Linux - Newbie 25 04-15-2005 06:16 PM
apache error iamthewind Linux - Networking 1 08-11-2004 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration