Я работаю с этой ошибкой час go, веб-сайт сообщает:
Forbidden
You don't have permission to access this resource.
Приложение работает на apache2 и gunicorn, вот мои конфигурации:
website.conf
<VirtualHost *:80>
ServerAdmin reznov110@gmail.com
DocumentRoot /home/flaskuser/app
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
<Location "/">
ProxyPass "http://127.0.0.1:5000/"
ProxyPassReverse "http://127.0.0.1:5000/"
</Location>
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.example.com [OR]
RewriteCond %{SERVER_NAME} =example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
app.service
[Unit]
Description=Gunicorn instance to serve myproject
After=network.target
[Service]
User=flaskuser
Group=www-data
WorkingDirectory=/home/flaskuser/app
Environment="PATH=/home/flaskuser/app/venv/bin"
ExecStart=/home/flaskuser/app/venv/bin/gunicorn --bind 0.0.0.0:5000 -k gevent -w 3 wsgi:application
[Install]
WantedBy=multi-user.target