Wpis z mikrobloga

Dlaczego po instalacji apache24 na FreeBSD, gdy chce wejsc zalozmy na index.html wybija ze brak uprawnien?
Forbidden

You don't have permission to access /index.html on this server.

Logi z httpd-error.log

//10.10.10.1/index.php
[Fri Jun 15 09:38:10.544459 2018] [authz_core:error] [pid 3639] [client 192.168.3.227:54851] AH01630: client denied by server configuration: /usr/local/www/apache24/data/favicon.ico, referer: http://10.10.10.1/index.html

Jak powinien wyglądać plik konfiguracyjny httpd.conf?

#it #informatyka #unix #freebsd #apache #www
  • 12
AllowOverride none
Require all denied

Ten fragment konfiguracji jest powodem komunikatu i nie nadpisujesz go później zezwalając na dostęp do swojej strony.

Dopisz

Options Indexes FollowSymLinks
AllowOverride None
Require all granted

w linijce 249 i powinno być ok.
@shpaq_: to samo, podczas resartu apache
Performing sanity check on apache24 configuration:
AH00112: Warning: DocumentRoot [/usr/local/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/local/docs/dummy-host2.example.com] does not exist
Syntax OK
Stopping apache24.
Waiting for PIDS: 3633.
Performing sanity check on apache24 configuration:
AH00112: Warning: DocumentRoot [/usr/local/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/local/docs/dummy-host2.example.com] does not exist
Syntax OK
Starting apache24.
AH00112: Warning: DocumentRoot [/usr/local/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/local/docs/dummy-host2.example.com] does not
Logi z połączenia po zmianie konfiguracji i próbie połączenia. Druga rzecz, z tego co widzę nie masz skonfigurowanego modułu php.

DirectoryIndex index.php index.html index.htm
AddType application/x-httpd-php .php