403 ошибка Laravel (Nginx + Apache) CentOS 8

Пытаюсь настроить работу сайта под связкой Nginx и Apache. При попытке достучаться до сайта получаю ошибку 403.

В файле /etc/httpd/conf/httpd.conf проставляю порт по умолчанию 8089 (т.к. 8080 уже занят):

Listen 127.0.0.1:8089

Далее прописываю конфиг для Apache (etc/httpd/conf.d/site.conf):

<VirtualHost 127.0.0.1:8089>
    ServerName site.com
    ServerAlias www.site.com
    DocumentRoot "/usr/share/site/public"

    ErrorLog /var/log/httpd/error.log
    CustomLog /var/log/httpd/access.log combined

    <Directory "/usr/share/site/public">
        Require all granted
        AllowOverride all
    </Directory>
</VirtualHost>

Создаю конфиг для Nginx ():

server {
    listen      80;
    server_name site.com www.site.com;
    root        /usr/share/site/public;
    
    charset utf-8;
    
    gzip on;
    gzip_types 
        text/css 
        application/javascript 
        text/javascript 
        application/x-javascript
        image/svg+xml 
        text/plain 
        text/xsd 
        text/xsl 
        text/xml 
        image/x-icon;
    
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    
    location ~ \.php {
        proxy_pass http://localhost:8089;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
        
    
    location ~ /\.ht {
        deny all;
    }
}

В чём может быть проблема?


Ответы (0 шт):