Я пытаюсь получить доступ к своему веб-приложению по этому адресу: http://127.0.0.1/rukovoditel, но оно не работает.
Я могу получить доступ, только если я go через sla sh в конце: http://127.0.0.1/rukovoditel/
Я попытался проверить вывод команды curl, она перенаправляется с http://127.0.0.1/rukovoditel на http://127.0.0.1/rukovoditel/ но после перенаправления приложение не запускается. Я просто получаю сообщение об ошибке в браузере: «Отказ в соединении». Nginx служба запущена. -t вывод правильный
Как изменить это поведение?
Это моя nginx полная конфигурация:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# configuration file /etc/nginx/nginx.conf:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
# include /etc/nginx/sites-enabled/*;
#include /etc/nginx/conf.d/*.conf;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
# configuration file /etc/nginx/conf.d/default.conf:
server {
listen 80;
server_name 127.0.0.1 localhost;
root /usr/share/nginx/html;
index index.php index.html index.htm index.nginx-debian.html;
location /rukovoditel {
# root /usr/share/nginx/html;
index index.php index.htm index.nginx-debian.html;
}
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}