mod_wsgi 403 forbidden(centos 6,pyramid)

时间:2015-05-16 14:24:37

标签: linux apache permissions centos mod-wsgi

我在digitalocean上托管了centos 6.5服务器。我用了安装mod_wsgi     yum install mod_wsgi 我的配置文件(/etc/httpd/config.d/wsgi.conf)是:

LoadModule wsgi_module modules/mod_wsgi.so

WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess pyramid user=wsgi processes=1 \
   threads=4 \
   python-path=/usr/local/lib/python3.5/site-packages/
WSGIScriptAlias /testproject /home/wsgi/modwsgi/pyramid/testproject/pyramid.wsgi

<Directory "/home/wsgi/modwsgi/pyramid/testproject">
  #WSGIProcessGroup pyramid
  #Order allow,deny
  #Allow from all
  Require all granted
</Directory>

我创建了新用户wsgi并将其添加到sudo和apache组。 我在/ home / wsgi中创建了文件夹modwsgi,并使用

授予对wsgi用户的访问权限
chown -R wsgi modwsgi

ls说:

[root@spiralarms wsgi]# ls -l
total 8
drwxr-xr-x 3 wsgi root 4096 May 16 09:35 modwsgi
以/ home / wsgi目录为根目录。 然后我开始httpd并打开http://spiralarms.ddns.net/testproject 我收到了这条消息:

Forbidden

You don't have permission to access /testproject on this server.
Apache/2.2.15 (CentOS) Server at spiralarms.ddns.net Port 80

Plz帮助

0 个答案:

没有答案