0
我已配置/etc/apache2/sites-enabled/000-default.conf
如下。Apache Web服務器多個項目文件夾託管問題
ServerName 0.0.0.0
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html
WSGIDaemonProcess python-app threads=15 maximum-requests=10000
WSGIScriptAlias//var/www/html/myapp/myapp.wsgi
WSGIProcessGroup python-app
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/myapp>
Order deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/html/test"
<Directory "/var/www/html/test">
AllowOverride All
</Directory>
</VirtualHost>
現在我的項目文件夾結構是這樣的:
我能夠訪問myapp
(蟒蛇瓶項目)。但不是我的test
項目html
文件。看起來像myapp.wsgi
(通過燒瓶應用程序)管理所有urls
。像test\index.html
這樣的url(用於訪問測試項目)未在flask應用中配置,因此出現錯誤。