0

无论我尝试使用我的 VPS 的公共 IP 地址进行访问,我都会根据标题收到错误。正如我在其他线程中看到的那样,这不仅仅与虚拟主机有关,但总的来说,如果我尝试访问 phpmyadmim、squirrelmail 或其他任何东西,我会收到此错误。

在 error.log 详细信息下方:

[Thu Jun 04 14:49:27.260966 2020] [access_compat:error] [pid 6190] [client 151.77.210.5:56615] 
*AH01797: client denied by server configuration: /var/www/html/
[Thu Jun 04 14:49:27.329891 2020] [access_compat:error] [pid 6191] [client 151.77.210.5:56616] AH01797: client denied by server configuration: /var/www/html/favicon.ico
[Thu Jun 04 14:49:31.763486 2020] [access_compat:error] [pid 6190] [client 151.77.210.5:56615] AH01797: client denied by server configuration: /usr/share/phpmyadmin/
[Thu Jun 04 14:49:39.399712 2020] [access_compat:error] [pid 6192] [client 151.77.210.5:56618] AH01797: client denied by server configuration: /var/www/html/squirrelmail/*

这是我的 apache2.conf:

    DefaultRuntimeDir ${APACHE_RUN_DIR}

    PidFile ${APACHE_PID_FILE}

    Timeout 300

    KeepAlive On

    MaxKeepAliveRequests 100

    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}

    HostnameLookups Off

    ErrorLog ${APACHE_LOG_DIR}/error.log

    LogLevel warn

    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf

    Include ports.conf

    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>

    <Directory /usr/share>
    AllowOverride None
    Require all granted
    </Directory>

    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>

    AccessFileName .htaccess

    <FilesMatch "^\.ht">
    Require all denied
    </FilesMatch>

    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent

    IncludeOptional conf-enabled/*.conf
    IncludeOptional sites-enabled/*.conf*

我提前感谢您给我的任何帮助!谢谢

4

0 回答 0