我在\var\www\html
Apache2的404錯誤的index.html
我/etc/apache2/sites-available/000-default.conf index.html文件是:
<VirtualHost *:80>
Servername <redacted>
ServerAdmin [email protected]
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log
<Directory /var/www/html>
AllowOverride All
</Directory>
<Location /alpha>
AuthType Basic
AuthName "Restricted Access - Authenticate"
AuthUserFile /etc/httpd/htpasswd.users
Require valid-user
</Location>
<Location /UserControl>
AuthType Basic
AuthName "Restricted Access - Authenticate"
AuthUserFile /etc/httpd/htpasswd.users
Require valid-user
</Location>
Redirect /alpha /alpha/
ProxyPass /alpha/ http://127.0.0.1:3838/alpha/
ProxyPassReverse /alpha/ http://127.0.0.1:3838/alpha/
WSGIDaemonProcess UserControl user=ubuntu group=ubuntu threads=5
WSGIScriptAlias//home/ubuntu/FlaskApps/UserControl/UserControl.wsgi
<Directory /home/ubuntu/FlaskApps/UserControl>
WSGIProcessGroup UserControl
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Order deny,allow
#Allow from all
Require all Granted
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
然而,當我去http://servername所有我得到的是一個404錯誤。該頁面未找到。我已經開始了一段時間了,不知道爲什麼。
爲了什麼是值得的,http://myservername/alpha和http://myservername/UserControl都工作,所以Apache正常工作。
任何幫助將不勝感激。
你有一個/var/www/html/index.html文件嗎? – ivanivan
是的,我複製了我能找到的最基本的演示文件,以確保沒有錯誤。我甚至嘗試過chmod 777,但也沒有修復。可能沒有權限問題,因爲它沒有找到404而不是403-forbiddenZ – user1357015