Welcome! Log In Create A New Profile

Advanced

nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /etc/nginx/includes/error-pages.conf:7

Posted by DeadalusHD 
Hi I got this error:

nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /etc/nginx/includes/error-pages.conf:7

My /error-pages.conf:

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
error_page 404 = @fallback;

location @fallback {
proxy_pass https://aebian.org/404;
}





## Whats causing this?

Kind Regards,

Alex
http://stackoverflow.com/questions/21662940/proxy-pass-cannot-have-uri-part-in-location

---
nginx for Windows http://nginx-win.ecsds.eu/
nginx is able to restart again but...
Well but now my 404 Page is not working anymore =(

GNU nano 2.2.6 File: /etc/nginx/includes/error-pages.conf

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
error_page 404 = @fallback;

location @fallback {
rewrite ^ /404$1;
proxy_pass https://aebian.org;
}
Enable debug logging as that will show you what nginx is doing with your config and requests.

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 182
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready