diff --git a/conf/nginx.conf b/conf/nginx.conf index 7958911..cbc5ecc 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,17 +1,14 @@ -location __PATH__/ { + root __FINALPATH__/; + index index.php; + + location __PATH__/ { + try_files $uri $uri/ /index.php?$args; + } -# Path to source -# alias __FINALPATH__/ ; - - proxy_pass http://127.0.0.1:3000/; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; -} + location ~ \.php$ { + include /etc/nginx/fastcgi_params; + try_files $uri =404; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; +} \ No newline at end of file diff --git a/scripts/install b/scripts/install index f58735f..b8a8687 100644 --- a/scripts/install +++ b/scripts/install @@ -183,7 +183,7 @@ ynh_add_nginx_config ### that really need such authorization. # Set permissions to app files -chgrp www-data $final_path/{config,files,files/_{dumps,sessions,cron,graphs,lock,plugins,tmp,rss,uploads,pictures,log}} +chown -R www-data:www-data $final_path #================================================= # SETUP SSOWAT