Remove last slash $request_uri nginx -


i'm trying redirect nginx http traffic incoming web server port 8443 in https. nginx configuration follows:

server {     listen 80 default_server;     return 301 https://$host:8443$request_uri; } 

unfortunately, configuration leads following result: if visitor pointing http://host nginx redirects him https://host/:8443, doesn't work.

i found way fix using return:

return 301 https://my.host.ip.address:8443; 

however, prefer keep variables $host , $request_uri


Comments

Popular posts from this blog

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -

php - Autoloader issue not returning Class -