【发布时间】:2018-06-17 13:50:12
【问题描述】:
我在 Debian 上有一个 Apache 2,并且是初学者(新手)。 在网络浏览器中访问我的网络服务器时,我会看到 Apache 默认欢迎页面:
我尝试显示我的真实网站(var/www/mywebsite.com/),而不是这个页面(位于 var/www/html)。下面是我服务器上的树:
---- etc
-------- apache2
------------ sites-enabled
---------------- mywebsite.com.vhost -> etc/apache2/sites-available/mywebsite.com.vhost
------------ sites-available
---------------- mywebsite.com.vhost
---- var
-------- www
------------ mywebsite.com
---------------- web
-------------------- css/
-------------------- js/
-------------------- img/
-------------------- error/
-------------------- index.html
-------------------- robots.txt
我的 .vhost 文件配置良好:
AllowOverride None
Require all denied
DocumentRoot /var/www/mywebsite.com
ServerName mywebsite.com
ServerAlias www.mywebsite.com
ServerAdmin webmaster@mywebsite.com
ErrorLog /var/log/ispconfig/httpd/mywebsite.com/error.log
Alias /error/ "/var/www/mywebsite.com/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
<Directory /var/www/mywebsite.com/web>
# Clear PHP settings of this website
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler None
</FilesMatch>
Options +FollowSymLinks
AllowOverride All
Require all granted.
</Directory>
.. 我重新启动了 Apache。没有成功! Apache 默认页面仍然存在。我错过了什么?
【问题讨论】: