0

I have looked at many similar questions on SO such as this one and I can even solve my problem by making the changes in the global directory. However, I want to do the changes inside of the httpd-vhosts.conf file. Here is what I currently have:

<VirtualHost *:80>
    ServerAdmin someEmail@gmail.com
    DocumentRoot "c:/www/firstSite.dev"
    <Directory "c:/www/firstSite.dev/">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order deny,allow
        Allow from all
    </Directory>
    ServerName firstSite.dev    
</VirtualHost>

However, I am still getting the error:

Forbidden

You don't have permission to access / on this server.

Any help would be appreciated.

Community
  • 1
  • 1
Adam Beck
  • 275
  • 2
  • 14
  • Do you have a .htaccess? The path you are using requires admin access to make changes to any files. What is at the end of that path? – Benjiman Mar 09 '13 at 06:17
  • I do not have a .htaccess file. All users have full access to C:/www/. That is also the entire path (i.e. c:/www/firstSite.dev/index.html) – Adam Beck Mar 09 '13 at 06:20

2 Answers2

0

You need to add your users explicitly in the httpd.conf file. The following line will do the trick

User daemon
Group daemon
User *user here*
Benjiman
  • 420
  • 2
  • 9
0

If you happen to be on a linux distro that includes SELinux such as CentOS, you need to make sure SELinux permissions are set correctly for your document root files or you will get this error. On RedHat / CentOS / Scientific Linux this can be done by editing /etc/sysconfig/selinux - find the parameter "selinux" and change the option "enforcing" to "disabled":

# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=disabled

Then reboot the server and test it out. If that solves it, you can either leave SELinux disabled, or configure SELinux so you can access your sites. Here is a good tutorial for configuring SELinux: http://beginlinux.com/server_training/web-server/976-apache-and-selinux

yellavon
  • 2,821
  • 12
  • 52
  • 66