Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

A strange virtual host problem?

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  POST and Transfer-Encoding: chunked problem  
Author Message
user2761

External


Since: Apr 30, 2004
Posts: 4



(Msg. 1) Posted: Fri Apr 30, 2004 10:52 pm
Post subject: A strange virtual host problem?
Archived from groups: alt>apache>configuration (more info?)

I have apache running, along with perl, php and mysql on a Win XP Pro box.
Everything was fine, I had my 'main' site set up in the apache folder, and a
couple of virtual hosts in various other folders.

I had a name from http://www.no-ip.com/ as the main site, and then set up a
..co.uk site as a virtual host.

I had a problem with my hard drive, so saved what I could, including my
http.conf file to refer back to and reinstalled everything, and also decided
to upgrade to apache 2.0.4.9 whilst I was at it.
Also, I decided to run what had previously been a virtual host as my 'main'
site, and make the previous 'main' site a virtual one.

So now I have my .co.uk as the main site and the http://www.no-ip.com/ set
up as virtual

My main site index.html is a frameset page that simply calls the content
pages, including a menu.html and a page called index1.php
The main site works without a problem.

However, when I connect to my virtual host site, which has ONLY a simple
index.html in it at the moment, it tries to call the same content pages, but
because they're not there (i.e. not in the virtual host folder) I get "The
requested URL /index1.php was not found on this server."


Here are some extracts from my http.conf

ServerRoot "C:/Program Files/Apache Group/Apache2"
Listen 80
ServerName themagsjfc.co.uk:80
UseCanonicalName On
DocumentRoot "f:/themags"
<Directory "f:/themags">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

UserDir "f:/dools"
<Directory "f:/dools">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

ErrorLog f:/themags/logs/mags_error.log
CustomLog f:/themags/logs/mags_access.log combined
ScriptAlias /cgi-bin/ "f:/themags/cgi-bin/"

<Directory "f:/themags/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

NameVirtualHost *

## default host
<VirtualHost *>
ServerName www.themagsjfc.co.uk
DocumentRoot "f:/themags"
ScriptAlias /cgi-bin/ "f:/themags/cgi-bin/"
ErrorLog f:/themags/logs/mags_error.log
CustomLog f:/themags/logs/mags_access.log combined
</VirtualHost>



## virtual host - dools.myftp.org

<VirtualHost *:80>
ServerName www.dools.myftp.org
DocumentRoot "f:/dools"
ScriptAlias /cgi-bin/ "f:/dools/cgi-bin/"
ErrorLog f:/dools/logs/dools_error.log
CustomLog f:/dools/logs/dools_access.log combined
</VirtualHost>


Why, when the virtual host is requested would apache take the index.html
from the main site, but then go looking in the virtual host directory for
the files??
I've even tried reinstalling apache completely with the same result.

Thanks for any help/advice pointing me to what I suspect is very basic
error!

Ian

 >> Stay informed about: A strange virtual host problem? 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Sat May 01, 2004 9:19 am
Post subject: Re: A strange virtual host problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ian <ian.dooleyNO.RemoveThis@spamblueyonder.co.uk> wrote:
<snap>
 > UseCanonicalName On
<snap>

I think that this is your problem.
Also, do not mix *:80 and just * in your VirtualHost directives,
use a consistent way.

Davide

--
| If at first you don't succeed, redefine success.
|
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: A strange virtual host problem? 
Back to top
Login to vote
user2761

External


Since: Apr 30, 2004
Posts: 4



(Msg. 3) Posted: Sat May 01, 2004 11:39 am
Post subject: Re: A strange virtual host problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.RemoveThis@onlyforfun.net> wrote in message
news:c6vfie$gr31p$4@ID-18487.news.uni-berlin.de...
 > Ian <ian.dooleyNO.RemoveThis@spamblueyonder.co.uk> wrote:
 > <snap>
  > > UseCanonicalName On
 > <snap>
 >
 > I think that this is your problem.
 > Also, do not mix *:80 and just * in your VirtualHost directives,
 > use a consistent way.
 >
 > Davide

Thank you Davide, I have adopted your suggestions, but unfortunately the
result is that now typing in either URL takes me to the main URL.

I changed the http.conf to that shown below:

ServerRoot "C:/Program Files/Apache Group/Apache2"
Listen 80
ServerName themagsjfc.co.uk
UseCanonicalName Off

DocumentRoot "f:/themags"
<Directory "f:/themags">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

UserDir "f:/dools"
<Directory "f:/dools">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

NameVirtualHost *

## default host
<VirtualHost *>
ServerName <a style='text-decoration: underline;' href="http://www.themagsjfc.co.uk" target="_blank">www.themagsjfc.co.uk</a>
DocumentRoot "f:/themags"
ScriptAlias /cgi-bin/ "f:/themags/cgi-bin/"
ErrorLog f:/themags/logs/mags_error.log
CustomLog f:/themags/logs/mags_access.log combined
</VirtualHost>

## virtual host - dools.myftp.org
<VirtualHost *>
ServerName <a style='text-decoration: underline;' href="http://www.dools.myftp.org" target="_blank">www.dools.myftp.org</a>
DocumentRoot "f:/dools"
ScriptAlias /cgi-bin/ "f:/dools/cgi-bin/"
ErrorLog f:/dools/logs/dools_error.log
CustomLog f:/dools/logs/dools_access.log combined
</VirtualHost><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: A strange virtual host problem? 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Sat May 01, 2004 3:14 pm
Post subject: Re: A strange virtual host problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ian <ian.dooleyNO RemoveThis @spamblueyonder.co.uk> wrote:
 > Thank you Davide, I have adopted your suggestions, but unfortunately the
 > result is that now typing in either URL takes me to the main URL.

I just checked and it looks to me that the <a style='text-decoration: underline;' href="http://www.dools...." target="_blank">www.dools....</a> does direct
to a different directory, but then the index.html is the same as the
'main' site. Problem is: all the other parts (is a frameset) aren't
there.

Check your index.html.
Check also the access_log for the two virtual hosts.


Davide

--
| Reality is a cop-out for people who can't handle drugs.
|
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: A strange virtual host problem? 
Back to top
Login to vote
user2761

External


Since: Apr 30, 2004
Posts: 4



(Msg. 5) Posted: Sat May 01, 2004 3:36 pm
Post subject: Re: A strange virtual host problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure RemoveThis @onlyforfun.net> wrote in message
news:c704a8$gf805$1@ID-18487.news.uni-berlin.de...
 > Ian <ian.dooleyNO RemoveThis @spamblueyonder.co.uk> wrote:
  > > Thank you Davide, I have adopted your suggestions, but unfortunately the
  > > result is that now typing in either URL takes me to the main URL.
 >
 > I just checked and it looks to me that the <a style='text-decoration: underline;' href="http://www.dools...." target="_blank">www.dools....</a> does direct
 > to a different directory, but then the index.html is the same as the
 > 'main' site. Problem is: all the other parts (is a frameset) aren't
 > there.
 >
 > Check your index.html.
 > Check also the access_log for the two virtual hosts.
 >
 >
 > Davide
 >

Thanks for the reply Davide,

the index.html in the f:/dools directory is simply
<html>
<body>
my index page
</body>
</html>

The error log shows
[Sat May 01 13:29:18 2004] [error] [client 82.42.57.163] File does not
exist: F:/dools/index1.php, referer: <a style='text-decoration: underline;' href="http://www.dools.myftp.org" target="_blank">http://www.dools.myftp.org</a>

So it appears that apache in pulling the wrong index.html (i.e. from my main
magsjfc.co.uk site) but looking for the links in the correct f:/dools
directory.

As the subject says .. a strange problem !!

Have you any other thoughts on this?
It's driving me crazy because it doesn't make sense!

Ian<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: A strange virtual host problem? 
Back to top
Login to vote
user2761

External


Since: Apr 30, 2004
Posts: 4



(Msg. 6) Posted: Sun May 02, 2004 2:29 am
Post subject: Re: A strange virtual host problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Curioser and curioser ...

I began to have problems with the hard drive that my two websites sat on, so
I moved them both to a new partition on my main (windows) drive.
All I did was altered the paths to the new sites in the http.conf and both
site now work as they should!

Thanks to Davide for his help.

Ian
(Confused but happy)

Smile
 >> Stay informed about: A strange virtual host problem? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
strange virtual host problem - Hi, I have a - what I think strange - virtual host problem. I do have a web server set up that uses ssl. Now I want to reroute the incoming requests to the https://. In order to do so I used Rewrite. My virtual hosts are configured somehow like that: ..

Strange problem with virtual hosts - Hi! I'm going mad. Really. All the day working on apache but it still does not want to do its job ... I have the following: Apache/1.3.27 (Unix) Debian GNU/Linux Kernel 2.4.18 /etc/apache/httpd.conf: ----- 8< ----- [...] <Directory /var/www/vh...

Virtual Host Problem - OK I have a web server that up until now served 1 web page. However the company needed to expand and needed to add a few other sites to handle customers and employees. So I added a few virtual host sections for the new sites. I also transfered the old..

virtual host problem - hi all i have add a virtual host in httpd.conf when i try to visit the url from the web my.ip/sitename all images's path point to my.ip/images how can i point image path to my.ip/sitename/images without change href from ="/images" to ="...

[2.0.40] Virtual Host Authentication Problem - Authentication works okay for normal document root. Its just for virtual host that the authentication does not activate. I setup as follows: o created passwd file using htpasswd command o copied .htaccess to virtual host docroot (permissions: are..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]