diff --git a/conf/nginx.conf b/conf/nginx.conf index 3bacff7..690c367 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,10 @@ location ^~ YNH_EXAMPLE_PATH { alias YNH_WWW_PATH; try_files $uri $uri/ @monica; index index.php; - + # Force https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } location ~ \.php { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/run/php/php7.0-fpm.sock;