1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpsysinfo_ynh.git synced 2024-09-03 19:56:43 +02:00

Reset nginx and phpfpm conf

Copy from example app
This commit is contained in:
Inrepublica 2020-03-25 23:04:34 +01:00
parent 1c98f016b6
commit 25fc54b1db
2 changed files with 23 additions and 42 deletions

View file

@ -2,37 +2,24 @@
location __PATH__/ { location __PATH__/ {
# Path to source # Path to source
alias __FINALPATH__/www/; alias __FINALPATH__/ ;
# Force usage of https # Force usage of https
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
# Default indexes and catch-all ### Example PHP configuration (remove it if not used)
index index.html index.php; index index.php;
try_files $uri $uri/ __PATH__/index.php?$args;
# Prevent useless logs # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
location = __PATH__/favicon.ico { #client_max_body_size 50M;
log_not_found off;
access_log off;
}
location = __PATH__/robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny access to hidden files and directories try_files $uri $uri/ index.php;
location ~ ^__PATH__/(.+/|)\.(?!well-known\/) {
deny all;
}
# Execute and serve PHP files
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user; fastcgi_param REMOTE_USER $remote_user;

View file

@ -428,9 +428,3 @@ chdir = __FINALPATH__
; php_admin_value[max_input_time] = 300 ; php_admin_value[max_input_time] = 300
; php_admin_value[memory_limit] = 256M ; php_admin_value[memory_limit] = 256M
; php_admin_flag[short_open_tag] = On ; php_admin_flag[short_open_tag] = On
; Additional php.ini defines, specific to this pool of workers.
php_value[upload_max_filesize] = 1G
php_value[post_max_size] = 1G
php_value[default_charset] = UTF-8
php_value[always_populate_raw_post_data] = -1