尝试将我的 djnago 项目上传到 apache2 服务器,但一开始无法访问(错误 403)。问题解决后又出现了新的内部服务器错误。/var/log/apache2/error.log:[Sat Se...
尝试将我的 djnago 项目上传到 apache2 服务器,但一开始无法访问(错误 403)。问题解决后又出现了新的内部服务器错误。
/var/log/apache2/error.log:
[Sat Sep 07 22:05:50.292291 2024] [core:warn] [pid 74852:tid 129319697659776] AH00045: child process 74853 still did not exit, sending a SIGTERM
[Sat Sep 07 22:05:50.292335 2024] [core:warn] [pid 74852:tid 129319697659776] AH00045: child process 74854 still did not exit, sending a SIGTERM
[Sat Sep 07 22:05:52.294434 2024] [core:error] [pid 74852:tid 129319697659776] AH00046: child process 74853 still did not exit, sending a SIGKILL
[Sat Sep 07 22:05:52.294476 2024] [core:error] [pid 74852:tid 129319697659776] AH00046: child process 74854 still did not exit, sending a SIGKILL
[Sat Sep 07 22:05:53.295592 2024] [mpm_event:notice] [pid 74852:tid 129319697659776] AH00491: caught SIGTERM, shutting down
[Sat Sep 07 22:08:55.562107 2024] [mpm_event:notice] [pid 76122:tid 129486358599552] AH00489: Apache/2.4.52 (Ubuntu) mod_wsgi/4.9.0 Python/3.10 configured -- resuming normal operations
[Sat Sep 07 22:08:55.562464 2024] [core:notice] [pid 76122:tid 129486358599552] AH00094: Command line: '/usr/sbin/apache2'
/etc/apache2/sites-available/mysite.conf
<VirtualHost *:80>
ServerName myip
WSGIScriptAlias / /my/directory/my_project/wsgi.py
<Directory /my/directory/my_project>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Alias /static /my/directory/my_project
<Directory /my/directory/my_project>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/mysite_error.log
CustomLog ${APACHE_LOG_DIR}/mysite_access.log combined
</VirtualHost>
如果有人需要更多信息,我很乐意提供
我已经尝试使用 sudo chmod -R 755 和 sudo chown -R www-data:www-data 等命令,但对我不起作用