Link to home
Start Free TrialLog in
Avatar of salveo
salveo

asked on

403 Error on Apache Virtual Host

I set up a virtual host in apache so that I can test a php website without having to have the website files in the default folder for localhost.

Everything is set up fine in terms of the apache configuration and virtaul host files but the permissions are not right.  What do I set them to and HOW do I set them?

I am using OSX 10.6

Is there a good program for CHMOD for within osx?  Is that what I need to do?
Avatar of Mick Barry
Mick Barry
Flag of Australia image

You can just use chmod (from the command line).
Let me know if you're not clear how to use chmod, wasn't clear from your q.
Avatar of Gremory
Gremory

If the permissions are your problem you can:

set the owner like this:
sudo chown -R user:group /var/www/

set the permissions like this:
sudo chmod -R 775 /var/www/

the -R stands for recursive, it will  go through all your sub files and dirs.

if your problem are the permissions to edit the files with another user, and have apache own the files at the same time, you should.

1ª Create a new group
2ª place apache user and all the other respective users in the same group
3º simply make the group owner of the dir. with the correct permissions.
Avatar of salveo

ASKER

The chmod thing didn't work and I'm thinking it might be which users have access to it.  Here is what is currently on there.

localhost (this currently works perfectly)
file path: /Library/WebServer/Documents/
Sharing & Permissions
system - Read & Write
admin - Read & Write
everyone - Read & Write

------------------------------------------
localhost2 (this DOES NOT work, this need to be fixed)
file path: /Users/Jason/Documents/Websites/salveosoft/wwwroot
Sharing & Permissions
Jason (Me) - Read & Write
staff - Read & Write
everyone - Read & Write


When I try and add the "system" user to localhost2 path folder (wwwroot) I can't fogure out how to particularly add the "system" user.  It just pulls up a little address book type thing and system isn't an option to pick.



>  I can't fogure out how to particularly add the "system" user.

assuming the system user exists

chown -R system /Users/Jason/Documents/Websites/salveosoft/wwwroot
Is your httpd.conf file configured correctly? do you have SE Linux enabled?
ASKER CERTIFIED SOLUTION
Avatar of salveo
salveo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial