Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

how to block excluding specific url in nginx? (1 reply)

$
0
0
hi. i have a trouble and question!
my current configuration in nginx is like ..
only "/blah/" url can access..

================================
server {
location / {
return 403;
}
location ^~ /blah/ {
proxy_pass http://127.0.0.1:8888;
}
}
================================

but now i have to access "/" location, too
how to block excluding specific url in nginx?

to conclude,
i want to access the only "/" and "/blah/" (for example, aaa.com and aaa.com/blah/~~)

can anyone help me?

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>