SSL on app - nginx web server
- by Adam
I am running an nginx web server where I redirect all http requests to https (with a self signed cert).
Here is how I REDIRECT all http requests to https in the nginx config file:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name my.server.ip;
return 301 https://$server_name$request_uri;
Problem is - I cannot seem to do so for an app running on a port. Example:
http://my.server.ip:1234 does not redirect to https://my.server.ip:1234
ir works fine on all other urls like http://my.server.ip/temp etc.
How can I modify the nginx config file to force that app url through ssl?