apache2 站点配置未应用

apache2 站点配置未应用

前段时间,我在本地 apache2 中将本地虚拟主机配置为 sherebiahtishbi.com,并且只能在本地网络内访问。

我正在使用 Ubuntu 19.10,apache2.4

在我的可用站点我有谢里比亚·蒂什比如下所示

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin [email protected]
    ServerName sherebiahtishbi.com
    ServerAlias www.sherebiahtishbi.com
    DocumentRoot /var/www/sherebiahtishbi.com/wordpress
    #DocumentRoot /var/www/wordpres

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

同样是在/sites-enabled/sherebiahtishbi.com.conf也一样。

之前文档根目录指向/var/www/sherebiahtishbi.com/familysite 现在它指向/var/www/sherebiahtishbi.com/wordpress如上虚拟主机配置所示。

我也重启了 apache2 服务,但访问 sherebiahtishbi.com 时,仍然会打开旧的 /familysite 主页。我清除了缓存,甚至重启了机器,但仍然无法浏览我的 wordpress 网站。

我刚刚在本地 apache2 中设置了 wordpress,但不确定我做错了什么。如能得到任何帮助我将不胜感激。

相关内容