This commit is contained in:
Gitea
2021-11-09 11:42:20 +01:00
parent 84aafcb77f
commit 96138ed7de
5 changed files with 31 additions and 22 deletions
+7 -5
View File
@@ -1,5 +1,3 @@
## ##
# webmail site # webmail site
## ##
@@ -38,9 +36,13 @@ server {
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
root /var/www/vhosts/solusar.de/subdomains/webmail; root /var/www/vhosts/solusar.de/subdomains/rainloop;
index index.php index index.php;
location ^~ /data {
deny all;
}
include global/restrictions.conf; include global/restrictions.conf;
include global/php.conf; include global/php74.conf;
} }
+6 -5
View File
@@ -1,7 +1,7 @@
upstream php-handler { #upstream php-handler {
#server 127.0.0.1:9000; # #server 127.0.0.1:9000;
server unix:/var/run/php/php7.4-fpm.sock; # server unix:/var/run/php/php8.0-fpm.sock;
} #}
server { server {
listen 80; listen 80;
@@ -144,7 +144,8 @@ server {
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler; #fastcgi_pass php-handler;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
fastcgi_request_buffering off; fastcgi_request_buffering off;
+11 -5
View File
@@ -18,9 +18,9 @@ server {
server_name ps.solusar.de; server_name ps.solusar.de;
#ssl on; #ssl on;
ssl_certificate /etc/letsencrypt/live/nc.solusar.de/fullchain.pem; ssl_certificate /etc/letsencrypt/live/ps.solusar.de/fullchain.pem;
ssl_trusted_certificate /etc/letsencrypt/live/nc.solusar.de/fullchain.pem; ssl_trusted_certificate /etc/letsencrypt/live/ps.solusar.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/nc.solusar.de/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/ps.solusar.de/privkey.pem;
ssl_dhparam /etc/myssl/dh4096.pem; ssl_dhparam /etc/myssl/dh4096.pem;
ssl_protocols TLSv1.2; ssl_protocols TLSv1.2;
@@ -36,7 +36,7 @@ server {
#add_header Content-Security-Policy "default-src 'none'; font-src 'self'; script-src 'self' 'unsafe-inline' https://nc.solusar.de; img-src * data:; object-src 'none'; style-src 'self' 'unsafe-inline' 'sha256-bQfd5MwpJ1ZxnVh373acxlqXQ8VwM88QhEHNuQ0ppNg='; frame-src 'self'; connect-src 'self'; form-action 'self'; base-uri 'self';frame-ancestors 'self';"; #add_header Content-Security-Policy "default-src 'none'; font-src 'self'; script-src 'self' 'unsafe-inline' https://nc.solusar.de; img-src * data:; object-src 'none'; style-src 'self' 'unsafe-inline' 'sha256-bQfd5MwpJ1ZxnVh373acxlqXQ8VwM88QhEHNuQ0ppNg='; frame-src 'self'; connect-src 'self'; form-action 'self'; base-uri 'self';frame-ancestors 'self';";
# set max upload size # set max upload size
client_max_body_size 2048M; client_max_body_size 4096M;
fastcgi_buffers 64 4K; fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers # Enable gzip but do not remove ETag headers
@@ -86,6 +86,7 @@ server {
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php` # then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response. # to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) { location ~ \.php(?:$|/) {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info; set $path_info $fastcgi_path_info;
@@ -98,12 +99,17 @@ server {
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler; #fastcgi_pass php-handler;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
fastcgi_request_buffering off; fastcgi_request_buffering off;
} }
location /serve-file {
internal;
alias /var/www/vhosts/solusar.de/subdomains/projectsend/upload/;
}
#location / { #location / {
# try_files $uri $uri/ /index.php$request_uri; # try_files $uri $uri/ /index.php$request_uri;
#} #}
+5 -6
View File
@@ -1,8 +1,3 @@
#upstream php-handler {
# #server 127.0.0.1:9000;
# server unix:/var/run/php/php8.0-fpm.sock;
#}
server { server {
listen 80; listen 80;
#listen [::]:80; #listen [::]:80;
@@ -17,6 +12,9 @@ server {
#listen [::]:443 ssl http2; #listen [::]:443 ssl http2;
server_name photos.solusar.de; server_name photos.solusar.de;
access_log /var/log/nginx/piwigo-access.log;
error_log /var/log/nginx/piwigo-error.log;
#ssl on; #ssl on;
ssl_certificate /etc/letsencrypt/live/photos.solusar.de/fullchain.pem; ssl_certificate /etc/letsencrypt/live/photos.solusar.de/fullchain.pem;
ssl_trusted_certificate /etc/letsencrypt/live/photos.solusar.de/fullchain.pem; ssl_trusted_certificate /etc/letsencrypt/live/photos.solusar.de/fullchain.pem;
@@ -86,6 +84,7 @@ server {
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php` # then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response. # to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) { location ~ \.php(?:$|/) {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info; set $path_info $fastcgi_path_info;
@@ -98,7 +97,7 @@ server {
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler; #fastcgi_pass php-handler;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
fastcgi_request_buffering off; fastcgi_request_buffering off;
+2 -1
View File
@@ -12,6 +12,7 @@ server {
server { server {
listen 443 ssl http2 default_server; listen 443 ssl http2 default_server;
#listen 443 ssl default_server;
server_name solusar.de www.solusar.de; server_name solusar.de www.solusar.de;
@@ -59,7 +60,7 @@ server {
#location ~ \.php$ { #location ~ \.php$ {
# try_files $uri =404; # try_files $uri =404;
# fastcgi_split_path_info ^(.+\.php)(/.+)$; # fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_pass unix:/run/php/php7.3-fpm.sock; # fastcgi_pass unix:/run/php/php8.0-fpm.sock;
# fastcgi_index index.php; # fastcgi_index index.php;
# include fastcgi_params; # include fastcgi_params;
#} #}