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

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

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

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -