[英]Apache2 403 Forbidden
我已經用Apache配置了mod_wsgi,但是得到403 Forbidden作為響應。
這是我在日志中看到的錯誤:
Symbolic link not allowed or link target not accessible: /mnt/myapp/current
這是我的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>
有人可以建議出什么問題嗎?
我解決了問題。
我將此配置添加到apache配置文件中:
DocumentRoot /mnt
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.