AboutHydraFerretArduinoxymonWeb-ServerModel Trains
Ubuntu ConfigNetworkingPHP and CGIRedirect to https

Configuring https redirection in Nginx

HydraFerret: Multi-sensor IOT with a simple interface.


To configure a redirect to https from any URL on http in Nginx, use a server stanza similar to the following, using either a 301 (moved permanently) or 302 (moved temporarily), or 307 (moved temporarily) return code:

server {
        listen 80 ;
        listen [::]:80 ;
        return 301 https://$host$request_uri;
        add_header X-Frame-Options "SAMEORIGIN";
}



Thank you for visiting conferre.cfHome