我正在尝试在centos 7上使用apache和mod_wsgi部署django应用程序。
我在httpd.conf
文件中添加了以下几行:
Alias /robots.txt /home/centos/sunlife/static/robots.txt
Alias /favicon.ico /home/centos/sunlife/static/favicon.ico
#Alias /media/ /path/to/mysite.com/media/
Alias /static/ /home/centos/sunlife/static/
<Directory /home/centos/sunlife/static>
Require all granted
</Directory>
#<Directory /path/to/mysite.com/media>
#Require all granted
#</Directory>
WSGIScriptAlias / /home/centos/sunlife/sunlife/wsgi.py
<Directory /home/centos/sunlife/sunlife>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
在尝试访问ip时,我被禁止访问。您无权访问此服务器上的/。