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?

Wilduck
  • 169
  • 6
  • 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 08 '10 at 21:59

1 Answers1

1

It should be

Order Allow,deny

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

Kyle
  • 562
  • 2
  • 5
  • 16
  • 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 'http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order'. – Graham Dumpleton Mar 09 '10 at 05:59