Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- server_name Domain;
- rewrite ^ https://$http_host$request_uri? permanent;
- proxy_set_header X-Forwarded-For $remote_addr;
- server_tokens off;
- }
- server {
- listen 443 ssl;
- listen [::]:443 ssl;
- server_name DOMAIN;
- ssl_certificate /etc/letsencrypt/live/DOMAIN/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/DOMAIN/privkey.pem;
- ssl_trusted_certificate /etc/letsencrypt/live/DOMAIN/chain.pem;
- proxy_set_header X-Forwarded-For $remote_addr;
- #Seafile -------------------------------------------------------------
- location / {
- proxy_pass http://127.0.0.1:8000;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Host $server_name;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_read_timeout 1200s;
- # used for view/edit office file via Office Online Server
- client_max_body_size 0;
- access_log /var/log/nginx/seahub.access.log;
- error_log /var/log/nginx/seahub.error.log;
- }
- location /seafhttp {
- rewrite ^/seafhttp(.*)$ $1 break;
- proxy_pass http://127.0.0.1:8082;
- client_max_body_size 0;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_connect_timeout 36000s;
- proxy_read_timeout 36000s;
- }
- location /seafmedia {
- rewrite ^/seafmedia(.*)$ /media$1 break;
- root /home/seafile/seafile-server-latest/seahub;
- }
- location /seafdav {
- proxy_pass http://127.0.0.1:8080/seafdav;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Host $server_name;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_read_timeout 1200s;
- client_max_body_size 0;
- access_log /var/log/nginx/seafdav.access.log;
- error_log /var/log/nginx/seafdav.error.log;
- }
- #Baikal ----------------------------------------------------------------------
- location /baikal {
- root /var/www/html;
- index index.php index.html;
- rewrite ^/.well-known/caldav /dav.php redirect;
- rewrite ^/.well-known/carddav /dav.php redirect;
- charset utf-8;
- location ~ /(\.ht|Core|Specific|config) {
- deny all;
- return 404;
- }
- location ~ ^(.+\.php)(.*)$ {
- try_files $fastcgi_script_name =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_pass unix:/var/run/php/php-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- }
- }
- #PHPMyadmin -------------------------------------------------------------
- location /phpmyadmin {
- root /usr/share;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /var/www/html/;
- fastcgi_pass unix:/var/run/php/php-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share;
- }
- }
- location /wppt {
- root /var/www/html;
- index index.php index.html;
- location ~ ^(.+\.php)(.*)$ {
- try_files $fastcgi_script_name =404;
- include /etc/nginx/fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_pass unix:/var/run/php/php-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- }
- }
- location /jsbin {
- root /var/www/html/;
- index index.php index.html;
- autoindex on;
- }
- #Kirby -------------------------------------------------------------
- location /XYZ {
- root /var/www/html/;
- index index.php index.html;
- location ~* \.php$ {
- try_files $uri =404
- include /etc/nginx/fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php/php-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- }
- }
- #Subfolder Wildcard -------------------------------------------------------------
- #location ~ /([a-z0-9]+.) {
- # root /var/www/html;
- # index index.html index.php;
- # location ~ ^(.+\.php)(.*)$ {
- # try_files $fastcgi_script_name =404;
- # include /etc/nginx/fastcgi_params;
- # fastcgi_split_path_info ^(.+\.php)(.*)$;
- # fastcgi_pass unix:/var/run/php/php-fpm.sock;
- # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- # fastcgi_param PATH_INFO $fastcgi_path_info;
- # }
- #}
- }
Advertisement
Add Comment
Please, Sign In to add comment