Re: [modwsgi] Apache Django mod_wsgi 403 error : You don't have permission to access / on this server

3,412 views
Skip to first unread message

Graham Dumpleton

unread,
Nov 16, 2012, 4:28:17 AM11/16/12
to modwsgi
Adding the Directory directive is normally the solution to that specific error. Permissions on the directory is normally a different error.

Can only suggest changing it to:

<Directory /tt_drive/code/tindo/terido/apache>
Order allow,deny
Allow from all
XXX SYNTAX ERROR XXX
</Directory>

and restart Apache.

If you get an error message about that line then the file is definitely being read at least.

If get error take that line out and then change WSGIScripAlias to:

WSGIScriptAlias / /XXXXXXX/tt_drive/code/tindo/terido/apache/django.wsgi

Restart and make request again. Validate that the error in Apache configuration is then showing the path with X's in it.

This will validate it is using that directive.

This is just to make sure you don't have multiple virtual host files which have duplicate definitions in them which aren't quite the same and you have been modifying the same one.

Also tell us which file you are putting it in. If in a sites-available directory, make sure that the sites-enabled directory still has a symlink to it and that it hasn't somehow become a copy and thus why you might have a duplicate.

Graham



On 16 November 2012 19:23, Milind <milind...@teritree.com> wrote:
I am configuring Apache to run with the WSGI module in place of Django development server.
Using Apache 2.4, mod_wsgi 3.4, Python 2.7 on Ubuntu 12.10 Desktop.

When I serve my site through Apache, I get this error :

Forbidden

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

My Apache configuration file looks like this(only the relevant fields) :

WSGIScriptAlias / /tt_drive/code/tindo/terido/apache/django.wsgi

<Directory /tt_drive/code/tindo/terido/apache>
Order allow,deny
Allow from all
</Directory>

Also I have set the permissions for the drive /tt_drive to be 777.

The Apache error log says something like this :

[Fri Nov 16 07:53:45.365094 2012] [authz_core:error] [pid 19081:tid 140242585626368] [client 223.239.136.204:52318] AH01630: client denied by server configuration: /tt_drive/code/tindo/terido/apache/django.wsgi

I searched Google for solutions. All of them told me to insert the <Directory> directive in my httpd.conf file. But I had already done that. Pretty clear from the mod_wsgi documentation. I also tried restarting my server multiple times. Still the same error.

Please help.

Thanks,
Milind.


--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/AIbCBpTIE3gJ.
To post to this group, send email to mod...@googlegroups.com.
To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.

Milind

unread,
Nov 16, 2012, 5:13:25 AM11/16/12
to mod...@googlegroups.com
Hey! I figured it out.
Seems like I had another <Directory> directive somewhere below in the httpd.conf. I don't know from where did it come but it was there and I had a lot of head scratching to do. Commenting that out served my site, but without the images and the CSS. I think I have some directives to place in the httpd.conf file which I am missing.

Thanks a lot,
Milind.
Reply all
Reply to author
Forward
0 new messages