Hello,
I need to redirect all website to https but not mysite.com/admin/ . I tried all solution but I get conflicts with kloxo-mr nginx files.
Normally I must modify only nginx mydomain.com.conf file from here /nginx/conf/domains but it gives me error "duplicate location "/" in /home/nginx/conf/globals/proxy.conf:38" .
This is what I try use on mydomain.com.conf :
server {
listen 80;
server_name example.com;
location /admin {
# handle admin area here;
}
location / {
return 301 https://$http_host$request_uri$is_args$query_string;
}
}
server {
listen 443 ssl;
server_name example.com;
# ssl settings
location /admin {
return 301 http://$http_host$request_uri$is_args$query_string;
}
location / {
# handle all ssl pages here
}
}