Changes

Jump to navigation Jump to search
350 bytes added ,  08:30, 16 March 2018
no edit summary
Line 1: Line 1:  +
== Redirect HTTP to HTTPS ==
 +
Create /etc/ngix/sites-available/RedirectHTTPtoHTTPS.conf
 +
<source>server {
 +
    listen 80;
 +
    rewrite ^(.*) https://$host$1 permanent;
 +
}</source>
 +
enable it with ln -s /etc/ngix/sites-available/RedirectHTTPtoHTTPS.conf /etc/ngix/sites-available/RedirectHTTPtoHTTPS<br />
 +
Restart Nginx service: sudo service nginx restart
 
== Password protected ==
 
== Password protected ==
 
Create a /etc/nginx/.htpasswd
 
Create a /etc/nginx/.htpasswd

Navigation menu