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:
parent
1c98f016b6
commit
25fc54b1db
2 changed files with 23 additions and 42 deletions
|
@ -1,46 +1,33 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
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\/) {
|
location ~ [^/]\.php(/|$) {
|
||||||
deny all;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
}
|
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||||
|
|
||||||
# Execute and serve PHP files
|
fastcgi_index index.php;
|
||||||
location ~ [^/]\.php(/|$) {
|
include fastcgi_params;
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_index index.php;
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
include fastcgi_params;
|
}
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
||||||
}
|
|
||||||
### End of PHP configuration part
|
### End of PHP configuration part
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
|
@ -427,10 +427,4 @@ chdir = __FINALPATH__
|
||||||
; php_admin_value[max_execution_time] = 600
|
; php_admin_value[max_execution_time] = 600
|
||||||
; 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
|
|
Loading…
Add table
Reference in a new issue