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: Newbie Question - Virtual Hosts
Author
zax24



Joined: 06 Aug 2007
Posts: 5

PostPosted: Mon 06 Aug '07 9:34    Post subject: Newbie Question - Virtual Hosts Reply with quote

Hi,

I am trying to set up Apache 2.2.4 to use virtual hosts, and I have nearly cracked it, but I seem to have a problem with the permissions.
I try and visit the root of the virtual host with the browser and I always get: 403 Forbidden

The error log says:
"client denied by server configuration: C:/var/cfmxapp"

and in the httpd-vhosts.conf file I have:

NameVirtualHost *

<VirtualHost *>

ServerName dev.in.stephenbarton.org
DocumentRoot "C:/var/cfmxapp/wwwroot/mySite"

ServerAdmin bartonsr@gmail.com
ErrorLog logs/mySite-error_log
CustomLog logs/mySite-access_log common

</VirtualHost>

So there seems to be a permission issue here, but I am stuck and no idea how to proceed. Any help will be greatly appreciated.

Thanks in advance,
Stephen
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 06 Aug '07 9:44    Post subject: Reply with quote

You need to add the permission for the doc root Wink

Code:

<VirtualHost *>
 ServerName dev.in.stephenbarton.org
DocumentRoot "C:/var/cfmxapp/wwwroot/mySite"

ServerAdmin bartonsr@gmail.com
ErrorLog logs/mySite-error_log
CustomLog logs/mySite-access_log common
<Directory "C:/var/cfmxapp/wwwroot/mySite">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>
Back to top
zax24



Joined: 06 Aug 2007
Posts: 5

PostPosted: Mon 06 Aug '07 10:00    Post subject: Reply with quote

Now that looked like it should have worked... but it didn't Sad

Code:

<VirtualHost *>

   ServerName dev.in.mySite.org
   DocumentRoot "C:/var/cfmxapp/wwwroot/dev.in.mySite.org"

   ServerAdmin bsr@gmail.com
   ErrorLog logs/dev.in.mySite.org-error_log
   CustomLog logs/dev.in.mySite.org-access_log common
   
   <Directory "C:/var/cfmxapp/wwwroot/dev.in.mySite.org">
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
   </Directory>

</VirtualHost>


The error in the log remains at:

"[client 127.0.0.1] client denied by server configuration: C:/var/cfmxapp"

Any other ideas?

Thanks,
Stephen
Back to top
zax24



Joined: 06 Aug 2007
Posts: 5

PostPosted: Mon 06 Aug '07 10:45    Post subject: Reply with quote

It seems I have a similar problem to that dforthman had in this thread:
http://www.apachelounge.com/viewtopic.php?t=1780

But there was no resolution to the problem... Crying or Very sad
Back to top
zax24



Joined: 06 Aug 2007
Posts: 5

PostPosted: Mon 06 Aug '07 10:48    Post subject: Reply with quote

Now the error log has logged the error:
"Warning: DocumentRoot [C:/var/cfmxapp/wwwroot/dev.in.mySite.org] does not exist"

But it does!! Really. Confused
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 06 Aug '07 13:33    Post subject: Reply with quote

Did you edit your host file to reach the domain name or do you tried 127.0.0.1 / localhost? Or do you run a DNS server?
Back to top
zax24



Joined: 06 Aug 2007
Posts: 5

PostPosted: Mon 06 Aug '07 15:09    Post subject: Reply with quote

I used 'localhost', is this the piece you mean?:
Code:
# localhost
<VirtualHost *>
    ServerName localhost
    DocumentRoot "C:/wamp/www"
   
    ServerAdmin bsr@gmail.com
    ErrorLog logs/localhost-error_log
    CustomLog logs/localhost-access_log common
</VirtualHost>


I don't use a DNS server and this is for a local install on a laptop.

Thanks,
Stephen
Back to top
lawrephordapach2



Joined: 21 Aug 2007
Posts: 4
Location: canada ontario thunder bay

PostPosted: Tue 21 Aug '07 2:10    Post subject: how have you solved the problem ? Reply with quote

let us know when you do please ?
Back to top


Reply to topic   Topic: Newbie Question - Virtual Hosts View previous topic :: View next topic
Post new topic   Forum Index -> Apache