Author |
|
zax24
Joined: 06 Aug 2007 Posts: 5
|
Posted: Mon 06 Aug '07 9:34 Post subject: Newbie Question - Virtual Hosts |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 06 Aug '07 9:44 Post subject: |
|
|
You need to add the permission for the doc root
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
|
Posted: Mon 06 Aug '07 10:00 Post subject: |
|
|
Now that looked like it should have worked... but it didn't
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
|
|
Back to top |
|
zax24
Joined: 06 Aug 2007 Posts: 5
|
Posted: Mon 06 Aug '07 10:48 Post subject: |
|
|
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. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 06 Aug '07 13:33 Post subject: |
|
|
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
|
Posted: Mon 06 Aug '07 15:09 Post subject: |
|
|
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
|
Posted: Tue 21 Aug '07 2:10 Post subject: how have you solved the problem ? |
|
|
let us know when you do please ? |
|
Back to top |
|