diff --git a/conf/nginx.conf b/conf/nginx.conf index 3c55da5..efb6b54 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,8 +7,7 @@ location PATHTOCHANGE { try_files $uri $uri/ /index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; - fastcgi_index index.php; + fastcgi_pass unix:/var/run/php5-fpm.sock; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; diff --git a/conf/nginx.conf-public b/conf/nginx.conf-public index cce15d8..a18b3ab 100644 --- a/conf/nginx.conf-public +++ b/conf/nginx.conf-public @@ -1,11 +1,13 @@ location PATHTOCHANGE { alias ALIASTOCHANGE; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } index index.php; try_files $uri $uri/ /index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; - fastcgi_index index.php; + fastcgi_pass unix:/var/run/php5-fpm.sock; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info;