Ubuntu 22.04에 php8.1-fpm을 설치했습니다. 원칙적으로 다 설정했는데 여전히 "403 Forbidden 이 리소스에 접근할 수 있는 권한이 없습니다."라는 오류 메시지가 뜹니다. 시스템은 개발 목적으로 자체 서명된 인증서를 사용하여 내부 네트워크에 구성됩니다.
지금까지 virtualmin으로 해왔는데 이제 익숙해지려나.. 거기에서 구성 기본은 샀는데 분명히 뭔가 부족한거같아
/etc/apache2/sites-available/mydomain.dev.conf:
<VirtualHost 192.168.0.4:443>
SuexecUserGroup "#1000" "#1000"
ServerName "mydomain.dev"
DocumentRoot "/home/mydomain/public_html"
ErrorLog "/home/mydomain/etc/log/md_error_log"
CustomLog "/home/mydomain/etc/log/md_access_log" "combined"
ScriptAlias "/cgi-bin/" "/home/mydomain/etc/cgi-bin/"
DirectoryIndex index.php index.html
<Directory "/home/mydomain/public_html">
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php8.1
FCGIWrapper /home/mydomain/etc/fcgi-bin/php8.1.fcgi .php
FCGIWrapper /home/mydomain/etc/fcgi-bin/php8.1.fcgi .php8.1
</Directory>
<Directory "/home/mydomain/etc/cgi-bin">
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile /home/mydomain/etc/certs/mydomain.dev+4.pem
SSLCertificateKeyFile /home/mydomain/etc/certs/mydomain.dev+4-key.pem
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCACertificateFile /home/mydomain/.local/share/mkcert/rootCA.pem
IPCCommTimeout 31
</VirtualHost>
/home/mydomain/etc/fcgi-bin/php8.1.fcgi:
#!bin/bash
PHPRC=$PWD/../etc/php8.1
export PHPRC
unmask 022
PHP_FCGI_CHILDREN=20
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=99999
export PHP_FCGI_MAX_REQUESTS
exec /bin/php-cgi8.1
/etc/mydomain/public_html및 하위 디렉터리 권한: 0755 파일 권한: 0644
오류 로그(링크가 없습니다./favicon.ico):
[Mon Apr 25 14:22:06.490822 2022] [core:error] [pid 24678] (13)Permission denied: [client 192.168.0.4:51818] AH00035: access to / denied (filesystem path '/home/mydomain/public_html') because search permissions are missing on a component of the path
[Mon Apr 25 14:22:06.721894 2022] [core:error] [pid 24678] (13)Permission denied: [client 192.168.0.4:51818] AH00035: access to /favicon.ico denied (filesystem path '/home/mydomain/public_html') because search permissions are missing on a component of the path, referer: https://mydomain.dev/
귀하의 도움에 미리 감사드립니다.