[英]Apache2 403 Forbidden
I have configured mod_wsgi with Apache, but I am getting 403 Forbidden as response. 我已经用Apache配置了mod_wsgi,但是得到403 Forbidden作为响应。
This is error that I can see in the log: 这是我在日志中看到的错误:
Symbolic link not allowed or link target not accessible: /mnt/myapp/current
This is how my apache config looks like: 这是我的apache配置的样子:
<VirtualHost *:443>
ServerName somedomain.com
ServerAlias www.somedomain.com
<Directory /mnt/myapp/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
<Directory /mnt/myapp/current/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
# Django Application
Alias /static /mnt/myapp/current/static
<Directory /mnt/myapp/current/static>
Options FollowSymLinks
Require all granted
</Directory>
<Directory /mnt/myapp/current/myproject/apache>
<Files wsgi.py>
Options FollowSymLinks
Require all granted
</Files>
</Directory>
WSGIDaemonProcess grapevine python-path=/mnt/myapp/current:/mnt/env/lib/python3.4/site-packages
WSGIProcessGroup myproject
WSGIScriptAlias / /mnt/myapp/current/myproject/apache/wsgi.py
SSLEngine on
SSLCertificateFile /home/myapp/myapp.com.crt
SSLCertificateKeyFile /home/myapp/myapp.com.key
SSLCertificateChainFile /home/myapp/myapp.crt
</VirtualHost>
Can someone advice what can be the problem? 有人可以建议出什么问题吗?
I solved the problem. 我解决了问题。
I added this configuration to apache config file: 我将此配置添加到apache配置文件中:
DocumentRoot /mnt
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.