0

I'm trying to set up Apache on a arch-linux box as a testing environment (I'm only using the localhost, not trying to serve anything to the greater web).

When setting up Django with mod_wsgi, it recommended that I set up a WSGIScriptAlias from / to /usr/local/django/mysite/apache/django.wsgi . I've done this, as well as added the /usr/.../apache directory to my httpd.conf. When I try to access http://localhost I get a 403 forbidden error. I have no idea why this is happening. Things I've tried so far:

1) chown -R http .../apache 2) chmod -R 777 .../apache 3) using a simple Alias directive to host a static file from that directory.

None of these have worked. I'm at a loss for what I'm doing wrong. Below is a relevant excerpt from my httpd.conf:

Alias / /usr/local/django/mysite/apache

<Directory "/usr/local/django/mysite/apache">
Order deny,allow
Allow from all
</Directory>

So my question is: what am I doing wrong?

  • The problem seems to be caused by the fact that I didn't have a trailing slash on my alias. Checking the error log, apache was trying to serve .../apacheindex.html instead of /apache/index.html – Wilduck Mar 8 '10 at 21:59
1

It should be

Order Allow,deny

Try that, and let us know what the issue is.

  • One can't blindly say that. The Order directive is a complicated little beast and whether the order matters really depends a lot on the context and how Allow and Deny directives are used in that scope and maybe even surrounding scopes. Documentation which can melt the brain can be found at 'httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order'. – Graham Dumpleton Mar 9 '10 at 5:59

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.