Apache - Apache2 Debian 默认页面而不是我的网站

Pao*_*o75 6 apache debian apache2

我在 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
Run Code Online (Sandbox Code Playgroud)

我的 .vhost 文件配置良好:

AllowOverride None
Require all denied
Run Code Online (Sandbox Code Playgroud)

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>
Run Code Online (Sandbox Code Playgroud)

..我重新启动了 Apache。没有成功!Apache 默认页面仍然在这里。我缺少什么?

Ben*_*Ben 0

index.html位于/var/www/mywebsite.com/web,我猜这是网站根文件夹?试试这个配置:

DocumentRoot /var/www/mywebsite.com/web
Run Code Online (Sandbox Code Playgroud)