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

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -