Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Apache conf and 403 Forbidden error

Apache conf and 403 Forbidden error
Thread Tools
depolitic
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 25, 2004, 10:28 PM
 
I had apache running and now its not and I keep getting 405 Forbidden.

I edited the /private/etc/httpd/users/jim.conf

<VirtualHost *:80>
ServerName scuttlebug
DocumentRoot /Users/jim/Developer/serverside/scuttlebug/scuttlebug/public/
ErrorLog /Users/jim/Developer/serverside/scuttlebug/scuttlebug/log/apache.log

<Directory /Users/jim/Developer/serverside/scuttlebug/scuttlebug/public/>
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
</Directory>
</VirtualHost>

and my /etc/hosts

looks this way

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 scuttlebug

Then restarted Apache only to get the 403.

Now my firewall was set to allow access to port 80 and even if I turned the firewall of it had not effect.

All the folders have the correct permissions:


drwxr-xr-x 15 jim jim 510 26 Oct 12:07 .
drwxr-xr-x 8 jim jim 272 26 Oct 12:07 ..
-rw-r--r-- 1 jim jim 6148 26 Oct 12:07 .DS_Store
-rw-r--r-- 1 jim jim 4591 25 Oct 12:15 README
-rwxr-xr-x 1 jim jim 4129 25 Oct 12:15 Rakefile
drwxr-xr-x 6 jim jim 204 25 Oct 12:15 app
drwxr-xr-x 4 jim jim 136 25 Oct 12:15 config
drwxr-xr-x 2 jim jim 68 25 Oct 12:15 db
drwxr-xr-x 3 jim jim 102 25 Oct 12:15 doc
drwxr-xr-x 2 jim jim 68 25 Oct 12:15 lib
drwxrwxrwx 4 jim jim 136 25 Oct 12:15 log
drwxr-xr-x 14 jim jim 476 25 Oct 12:15 public
drwxr-xr-x 5 jim jim 170 25 Oct 12:15 script
drwxr-xr-x 6 jim jim 204 25 Oct 12:15 test
drwxr-xr-x 6 jim jim 204 25 Oct 12:15 vendor

ANy suggestions as to were I should look next.
     
Nitride
Fresh-Faced Recruit
Join Date: Sep 2001
Status: Offline
Reply With Quote
Oct 26, 2004, 12:29 PM
 
Try running this in the Terminal:

apachectl /etc/httpd/users/jim.conf configtest

This will verify that your config file is free of errors. If not it will tell you. You should always run this after making significant changes to the apache conf files.

You should also open the Apache error log in Console and see what is causing apache to die.
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Oct 26, 2004, 03:04 PM
 
The web server does not run as jim it runs as www. You need to ensure that your web directory and every directory above it is world readable and world executable.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Oct 26, 2004, 07:43 PM
 
This did it:

chmod -R +x /Users

because my site sits in my users folder.

Question does this not expose me by having a whole path from root to deep inside my users folder executable?
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:10 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,