Answer the question
In order to leave comments, you need to log in
403 - Where is the error, in nginx or firewall settings?
server {
listen 80 default_server;
root /srv/shared/;
access_log off;
error_log /var/log/nginx/router.error.log;
#include /etc/nginx/default.d/server.conf;
#подключаю стандартные настройки для всех серверов
index index.php index.html index.htm;
charset utf-8;
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
access_log off;
log_not_found off;
expires 360d;
}
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
location ~ \.(php|phar)(/.*)?$ {
#include /etc/nginx/default.d/php-fpm.location.conf;
#подключаю стандартные fastcgi настройки
fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;
fastcgi_intercept_errors on;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
#include /etc/nginx/default.d/location.conf;
#подключаю стандартные настройки для всех location
try_files $uri $uri/ =404;
server_tokens off;
client_max_body_size 3m;
client_body_buffer_size 128k;
fastcgi_pass unix:/var/run/php-fpm/router.sock;
}
location / {
#include /etc/nginx/default.d/location.conf;
#подключаю стандартные настройки для всех location
try_files $uri $uri/ =404;
server_tokens off;
client_max_body_size 3m;
client_body_buffer_size 128k;
}
}
[[email protected] nginx]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: enp0s3
sources:
services: cockpit ssh
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
rule family="ipv4" source address="192.168.0.100" destination address="192.168.0.200" accept
2020/04/03 21:57:12 [error] 3929#0: *15 directory index of "/srv/shared/1/" is forbidden, client: 192.168.0.100, server: , request: "GET /1/ HTTP/1.1", host: "192.168.0.200", referrer: "http://192.168.0.200/"
location / {
include /etc/nginx/default.d/location.conf;
autoindex on;
autoindex_localtime on;
autoindex_exact_size off;
}
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