配置apache2

时间:2019-04-08 08:25:28

标签: apache

我知道这个话题已经回答了很多次,但是我只找到旧的apache配置的解决方案,我真的很努力。

尤其是那一个:

how-do-i-change-the-root-directory-of-an-apache-server

apache-2-sites-available-configuration

error-message-forbidden-you-dont-have-permission-to-access-on-this-server

(法语) apache-resoudre-l-erreur-forbidden-you-don-t-have-permission-to-access-on-this-server/

我已经尝试应用发现的内容,但仍然无法正常工作,我不知道自己在做什么错。

这是我的etc / apache2 / sites-available / 000-default.conf文件

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /home/user/www/html

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

    <Directory />
        Options FollowSymLinks AllowOverride All Order deny,allow Deny from all
    </Directory>
    <Directory /home/usr/www/html/>
        Allow from all
    </Directory>
</VirtualHost>

这是我的最后日志。我不知道它们是否非常实用,因为我尝试了许多配置。

access.log

192.168.10.49 - - [08/Apr/2019:10:31:03 +0200] "GET / HTTP/1.1" 403 509 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:31:03 +0200] "GET /favicon.ico HTTP/1.1" 403 519 "http://192.168.10.69/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:31:04 +0200] "GET / HTTP/1.1" 403 508 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:31:04 +0200] "GET /favicon.ico HTTP/1.1" 403 519 "http://192.168.10.69/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:31:24 +0200] "GET / HTTP/1.1" 403 509 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:31:25 +0200] "GET /favicon.ico HTTP/1.1" 403 519 "http://192.168.10.69/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:31:25 +0200] "GET / HTTP/1.1" 403 508 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:31:26 +0200] "GET /favicon.ico HTTP/1.1" 403 519 "http://192.168.10.69/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127"
192.168.10.49 - - [08/Apr/2019:10:32:17 +0200] "-" 408 0 "-" "-"

error.log

[Mon Apr 08 10:31:03.813961 2019] [authz_core:error] [pid 2523] [client 192.168.10.49:58744] AH01630: client denied by server configuration: /home/pi/www/html/favicon.ico, referer: http://192.168.10.69/
[Mon Apr 08 10:31:04.652973 2019] [authz_core:error] [pid 2523] [client 192.168.10.49:58744] AH01630: client denied by server configuration: /home/pi/www/html/
[Mon Apr 08 10:31:04.793178 2019] [authz_core:error] [pid 2523] [client 192.168.10.49:58744] AH01630: client denied by server configuration: /home/pi/www/html/favicon.ico, referer: http://192.168.10.69/
[Mon Apr 08 10:31:24.955246 2019] [authz_core:error] [pid 2531] [client 192.168.10.49:58750] AH01630: client denied by server configuration: /home/pi/www/html/
[Mon Apr 08 10:31:25.197949 2019] [authz_core:error] [pid 2531] [client 192.168.10.49:58750] AH01630: client denied by server configuration: /home/pi/www/html/favicon.ico, referer: http://192.168.10.69/
[Mon Apr 08 10:31:25.985987 2019] [authz_core:error] [pid 2531] [client 192.168.10.49:58750] AH01630: client denied by server configuration: /home/pi/www/html/
[Mon Apr 08 10:31:26.098043 2019] [authz_core:error] [pid 2531] [client 192.168.10.49:58750] AH01630: client denied by server configuration: /home/pi/www/html/favicon.ico, referer: http://192.168.10.69/

第一时间我尝试配置apache服务器...我敢肯定我犯了一个重大错误。我只想更改服务器根目录的位置,以通过FTP访问php文件。请耐心等候。

0 个答案:

没有答案