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;
|
||||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/www/;
|
||||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Default indexes and catch-all
|
||||
index index.html index.php;
|
||||
try_files $uri $uri/ __PATH__/index.php?$args;
|
||||
### Example PHP configuration (remove it if not used)
|
||||
index index.php;
|
||||
|
||||
# Prevent useless logs
|
||||
location = __PATH__/favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
location = __PATH__/robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
||||
#client_max_body_size 50M;
|
||||
|
||||
# Deny access to hidden files and directories
|
||||
location ~ ^__PATH__/(.+/|)\.(?!well-known\/) {
|
||||
deny all;
|
||||
}
|
||||
try_files $uri $uri/ index.php;
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||
|
||||
# Execute and serve PHP files
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
fastcgi_index index.php;
|
||||
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
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
|
@ -428,9 +428,3 @@ chdir = __FINALPATH__
|
|||
; php_admin_value[max_input_time] = 300
|
||||
; php_admin_value[memory_limit] = 256M
|
||||
; 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