Awesome, thanks @julian
I created a second server block to handle all HTTP connections and redirects them to HTTPS server block and it works great.
Thanks
springway
Posts
-
How to force HTTP to HTTPS? -
How to force HTTP to HTTPS?@julian Hey, thanks @julian for your reply. Currently I configured the server block (btw I am using Nginx v1.6.2 to proxy the port number in the URL) in a way to handle both HTTP and HTTPS protocols:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
listen 443 ssl;... location to ssl certificate and key + SSL specific config;
... server root info;
server_name mysite.com www.mysite.com;
location / {
# proxy, proxy pass and socket.io info to handle the port and use mysite.com instead of mysite.com:4567 (same as Nodebb user manual)
}
}Shall I add a new server block to force reload HTTPS instead of HTTP connections or just add the return 301 command to current server block? Thanks
-
How to force HTTP to HTTPS?Hi everyone, I have just begin to learn about Nodebb and it is a great forum. I need to run (force) all http connections to https, how could I do that that please? E.g. if I type http://mysite.com in the address bar. then https://mysite.com loads instead. I have a signed SSL already installed on the server, and both http://mysite.com and https://mysite.com work fine. Thanks