Answer the question
In order to leave comments, you need to log in
How to configure nginx redirect with exception by url?
The situation is as follows, there is Nginx as a proxy to Apache,
all requests on port 80 are redirected to port 443, it is done like this:
server {
listen 80;
server_name site.com www.site.com *.site.com;
location / {
rewrite ^/(.*) https://site.com/$1 permanent;
}
}
server {
listen 443;
Answer the question
In order to leave comments, you need to log in
Add the appropriate `location`
server {
listen 80;
server_name site.com www.site.com *.site.com;
location / {
return 301 https://site.com$request_uri;
}
location /system/handle/ {
# делать что надо
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question