Apache mod_wsgi Django Setup - Forbidden You do not have access to / mysite access on this server

I have python 26, Apache 2.2, modwsgi ap2.2 py26 on Windows XP. and apache loads modwsgi in order. when I check localhost: apache says it works! but when I try to open the Django mysite directory: localhost / mysite i get: forbidden You do not have access to / mysite access on this server. I reinstalled and installed this many times, but still the same thing. The tutorial says: "This worked httpd.conf The LoadModule module wsgi_module / mod_wsgi.so WSGIScriptAlias ​​//mysite/apache/mysite.wsgi works fine, as in: http://docs.djangoproject.com/en/dev/howto / deployment / modwsgi / My project path is C: \ mysite and as per " http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/"The path of mysite.wsgi is C: \ mysite \ apache \ mysite.wsgi I have a search on this problem, but a solution on Linux, please give me any answer for Windows.

and the error log: - [error] [client 127.0.0.1] the client refused the server configuration: C: /mysite/apache/mysite.wsgi someone can help with this ... thanks

+3
source share
2 answers

Linux, Windows, ( ) mod_wsgi. , , mysite.wsgi correct. , , , "" , .

WSGIProcessGroup  foo
WSGIDaemonProcess foo processes=2 threads=5 home=/data/web/foo display-name=foo

DocumentRoot /var/www

WSGIScriptAlias / /data/web/foo/apache/django.wsgi
<Directory /data/web/foo/apache>
  Order allow,deny
  Allow from all
</Directory>

Alias /static/ /data/web/foo/site/foo/static/
<Directory /data/web/foo/site/foo/static/>
  SetHandler None
  Order allow,deny
  Allow from all
</Directory>
+2

httpd.conf:

<Directory C:/mysite/apache>
  Order deny,allow
  Allow from all
</Directory>
0

Source: https://habr.com/ru/post/1766192/


All Articles