Good day. My nginx is configured as a proxy to apache. That is, nginx on port 80, and apache on 81. Here is the config:
server { listen 80; server_name jamesjgoodwin.ru www.jamesjgoodwin.ru; location / { rewrite ^(.*)$ https://jamesjgoodwin.ru$1 permanent; } } server { listen 443 ssl; server_name jamesjgoodwin.ru www.jamesjgoodwin.ru; ssl on; ssl_certificate /etc/ssl/jamesjgoodwin.crt; ssl_certificate_key /etc/ssl/jamesjgoodwin.key; location / { proxy_pass http://127.0.0.1:81/; index index.html index.php; proxy_redirect off; } location ~* \.(html|jpeg|jpg|gif|png|css|js|pdf|txt|tar|ico)$ { root /var/www/; expires 30d; } location ~ /.ht { deny all; } if ($http_host ~ "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}") { return 444; } } But for some reason, if I write a link without a slash at the end, then ERR_CONNECTION_REFUSED knocks me out. And in the address bar is added: 81 to my site, that is, redirect to port 81. If the link is closed with a slash, then this does not happen. How to fix this?
proxy_redirect default;- nörbörnënwget -S --spider http://127.0.0.1:81/ссылка-без-слэша- aleksandr barakin