1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 20:25:28 +03:00
aports/testing/kopano-webapp/nginx-location.conf
Noel Kuntze eba5255e33 testing/kopano-webapp: new aport
WebApp for Kopano
2021-07-31 20:14:18 +00:00

43 lines
1.6 KiB
Text

###
## In order to run this component you need to define a server-context in.
## /etc/nginx/nginx.conf:
##
## http {
## server {
## listen 80;
## include ${PATH_TO_THIS_LOCATION_FILE};
## }
## }
##
## Or include this file in your existing server-context.
##
location /kopano-webapp {
root /usr/share/webapps;
index index.php;
gzip_static on;
gzip_vary on;
## [WARNING] The following header states that the browser should only communicate
## with your server over a secure connection for the next 24 months.
add_header Strict-Transport-Security max-age=63072000;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
# HIDDEN FILES AND FOLDERS
rewrite ^(.*)\/\.(.*)$ @404 break;
## Increase this if you want to upload large attachments
client_max_body_size 20m;
# Pass PHP scripts to PHP-FPM
location ~* \.php$ {
if (!-f $request_filename) {
return 404;
}
fastcgi_index index.php;
fastcgi_pass unix:/var/lib/php7/fpm/kopano-webapp.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}