You should use Directory with the real path, not the alias
<Directory */var/www/django/wsgi-scripts*>
Order Allow,Deny
Deny from all
</Directory>
<Directory /var/www/>
Order Allow,Deny
Allow from all
</Directory>
like in the example :)
Regards,
Matias.
On Mon, Sep 7, 2009 at 5:56 PM, Léon Dignòn <[email protected]> wrote:
>
> No, I have it here, but forgot to post it:
>
> <Directory />
> Order Allow,Deny
> Deny from all
> </Directory>
> <Directory /var/www/>
> Order Allow,Deny
> Allow from all
> </Directory>
>
> On Sep 7, 10:11 pm, Matias <[email protected]> wrote:
> > I think you missed the allow directive in your apache conf.
> >
> > Example from [1]
> >
> > Alias /media/ /usr/local/django/mysite/media/
> >
> > <Directory /usr/local/django/mysite/media>
> > Order deny,allow
> > Allow from all
> > </Directory>
> >
> > WSGIScriptAlias / /usr/local/django/mysite/apache/django.wsgi
> >
> > <Directory /usr/local/django/mysite/apache>
> > Order deny,allow
> > Allow from all
> > </Directory>
> >
> > [1]http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
> >
> > HTH,
> > Matias.
> >
> >
> >
> >
> >
> > On Mon, Sep 7, 2009 at 2:55 PM, Léon Dignòn <[email protected]>
> wrote:
> >
> > > I get a 403 forbidden.
> >
> > > I serve Django with apache2+mod_wsgi. I disabled some plugins I think
> > > I don't need. Set the listen port to 8000 on localhost only. Later I
> > > will serve django through reverse proxy on cherokee webserver. But for
> > > now, localhost:8000 is returning a 403 forbidden error.
> >
> > > Any ideas?
> >
> > > # error.log
> > > [Mon Sep 07 17:14:59 2009] [error] [client 127.0.0.1] client
> > > denied by server configuration: /htdocs
> >
> > > lwp-request -m GET -Sedhttp://127.0.0.1:8000/
> > > lwp-request <http://127.0.0.1:8000/%0Alwp-request> -m GET -Sed
> > >http://beispiel.de:8000/
> > > GEThttp://127.0.0.1:8000/--> 403 Forbidden
> > > Connection: close
> > > Date: Mon, 07 Sep 2009 14:56:32 GMT
> > > Server: Apache
> > > Content-Length: 202
> > > Content-Type: text/html; charset=iso-8859-1
> > > Client-Date: Mon, 07 Sep 2009 14:56:32 GMT
> > > Client-Peer: 127.0.0.1:8000
> > > Client-Response-Num: 1
> > > Title: 403 Forbidden
> >
> > > # /etc/apache2/ports.conf
> > > NameVirtualHost 127.0.0.1:8000
> > > Listen 127.0.0.1:8000
> >
> > > # /etc/apache2/sites-enabled/000-default
> > > <VirtualHost 127.0.0.1:8000>
> > > ServerName localhost
> > > ServerAdmin webmas...@localhost
> > > </VirtualHost>
> >
> > > # /etc/apache2/sites-enabled/beispiel.de
> > > <VirtualHost 127.0.0.1:8000>
> > > ServerNamewww.beispiel.de
> > > ServerAlias beispiel.de
> > > ServerAdmin [email protected]
> >
> > > DocumentRoot /var/www/django/beispiel
> >
> > > Alias /robots.txt /var/www/django/beispiel/media/
> > > robots.txt
> > > Alias /favicon.ico /var/www/django/beispiel/media/
> > > favicon.ico
> > > Alias /media/ /var/www/django/beispiel/media/
> >
> > > ErrorLog "|/usr/sbin/rotatelogs /var/log/apache2/
> > > beispiel.de/error_log.%Y-%m-%d 86400"
> > > CustomLog "|/usr/sbin/rotatelogs /var/log/apache2/
> > > beispiel.de/access_log.%Y-%m-%d 86400" common
> >
> > > WSGIScriptAlias / /var/www/django/wsgi-scripts/
> > > beispiel.wsgi
> > > </VirtualHost>
> >
> > > # mods-enabled
> > > alias.conf
> > > alias.load
> > > auth_digest.load
> > > authn_file.load
> > > authz_default.load
> > > authz_groupfile.load
> > > authz_host.load
> > > authz_user.load
> > > status.conf
> > > status.load
> > > wsgi.conf
> > > wsgi.load
> >
> > --
> > :wq- Hide quoted text -
> >
> > - Show quoted text -
> >
>
--
:wq
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---