Answer the question
In order to leave comments, you need to log in
Why is nginx returning 403?
There is an nginx config:
server {
listen 80;
server_name sub.domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name sub.domain.com;
root /home/back/project/randomname/public/;
index index.php;
ssl_certificate /etc/letsencrypt/live/randomname/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/randomname/privkey.pem;
access_log /var/log/nginx/nginx-access.log;
error_log /var/log/nginx/nginx-error.log;
location /app/ {
root /home/back/project/randomname/app;
index index.html;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
location /app {
root /home/back/project/randomname/app/;
index index.html;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question