Advertisement
Guest User

Untitled

a guest
Jun 28th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.98 KB | None | 0 0
  1. server {
  2.     server_name openmediavault-webgui;
  3.     root /var/www/openmediavault;
  4.     index index.php;
  5.     autoindex off;
  6.     server_tokens off;
  7.     sendfile on;
  8.     large_client_header_buffers 4 32k;
  9.     client_max_body_size 25M;
  10.     error_log /var/log/nginx/openmediavault-webgui_error.log error;
  11.     access_log /var/log/nginx/openmediavault-webgui_access.log combined;
  12.     error_page 404 = /404.php;
  13.     location /404.html {
  14.         internal;
  15.     }
  16.     location /extjs6/ {
  17.         alias /usr/share/javascript/extjs6/;
  18.         expires 2d;
  19.     }
  20.     location ~ ^/(css|fonts|js|images)/ {
  21.         expires 2d;
  22.     }
  23.     location /favicon {
  24.         expires 14d;
  25.     }
  26.     location ~ \.php$ {
  27.         try_files $uri =404;
  28.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  29.         fastcgi_pass unix:/var/run/php-fpm-openmediavault-webgui.sock;
  30.         fastcgi_index index.php;
  31.         fastcgi_read_timeout 60s;
  32.         include fastcgi.conf;
  33.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  34.     }
  35.     listen [::]:80 ipv6only=off;
  36.     if ($scheme = http) {
  37.         # Force redirection to HTTPS.
  38.         return 301 https://$host:443$request_uri;
  39.     }
  40.    
  41.      location ~ \.(?:css|js|woff2?|svg|gif|png|html|ttf|ico|jpg|jpeg)$ {
  42.     try_files $uri /index.php$request_uri;
  43.     access_log off;
  44.     expires 360d;
  45.   }
  46.  
  47.     location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
  48.         try_files $uri /index.php$uri$is_args$args;
  49.         access_log off;
  50.     }
  51.  
  52.    
  53.     listen [::]:443 ipv6only=off ssl deferred;
  54.     xxx.crt;
  55.     xxx.key;
  56.     include /etc/nginx/openmediavault-webgui.d/*.conf;
  57.    
  58.     location /Nextcloud1/ {
  59.         proxy_pass https://10.0.0.2:9443/;
  60.         proxy_set_header Host $host;
  61.         proxy_set_header X-Real-IP $remote_addr;
  62.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  63.         proxy_set_header X-Forwarded-Proto $scheme;
  64.         proxy_set_header X-Forwarded-Proto https;
  65.     }
  66.    
  67.  
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement