logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Strange Virtual Host Problems
Author
rigadon



Joined: 01 Mar 2007
Posts: 3

PostPosted: Thu 01 Mar '07 1:57    Post subject: Strange Virtual Host Problems Reply with quote

Hi everyone!

I am using the latest version of Apache (downloaded today) on Windows XP. I have setup a virtual host for a website hosted in the /httpd/testing/wwwroot/ directory on my computer. I have commented IN the following line in httpd.conf:

Code:
Include conf/extra/httpd-vhosts.conf

And I have added the required VirtualHost entries to the httpd-vhosts.conf file:

Code:
NameVirtualHost *:80

<VirtualHost *:80>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@localhost.testing
    DocumentRoot /httpd/testing/wwwroot/
    ScriptAlias /cgi-bin/ /httpd/testing/wwwroot/cgi-bin/
    DirectoryIndex index.html
    ServerName localhost.testing
    ErrorLog logs/localhost.testing-error_log
    CustomLog logs/localhost.testing-access_log common
</VirtualHost>

Accessing http://localhost works fine but http://localhost.testing gives me a 403 Forbidden error. If I set the DocumentRoot directive to the same as in the main httpd.conf (<installation directory>/htdocs) it works fine. I've also tried creating an index.html file in <installation directory>/htdocs/x and using this as the DocumentRoot. This works fine too.

The only conclusion I can come to is that it is down to permissions on the folder. But so far as I am aware Apache has access to read the folder I have directed it to.

Please anyone who can help I would greatly appreciate it as I need to get this fixed ASAP.

Thanks
Jay


Last edited by rigadon on Thu 01 Mar '07 2:05; edited 1 time in total
Back to top
rigadon



Joined: 01 Mar 2007
Posts: 3

PostPosted: Thu 01 Mar '07 2:05    Post subject: Reply with quote

Hmmm - do I need to fix the <Directory>...</Directory> block somehow? Or add one for the directory I am trying to use? That might be way off track Smile
Back to top
rigadon



Joined: 01 Mar 2007
Posts: 3

PostPosted: Thu 01 Mar '07 10:37    Post subject: Reply with quote

Someone from another forum answered this question for me - I need to include a Directory block like this:

Code:
<Directory /httpd/testing/wwwroot>
    ... (whatever options you want)
    Allow from all
</Directory>

Thanks for looking in!
Back to top


Reply to topic   Topic: Strange Virtual Host Problems View previous topic :: View next topic
Post new topic   Forum Index -> Apache