Advertisement
cdelphi78

Untitled

Oct 6th, 2022
677
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. server {
  2.         listen 80;
  3.         listen [::]:80;
  4.  
  5.         root /var/www/servicedesk/html;
  6.         index index.html index.php index.htm index.nginx-debian.html;
  7.  
  8.         server_name 192.168.4.180 www.servicedesk;
  9.  
  10.         location / {
  11.         if (-f $document_root/reconstruction.html) {
  12.             return 503;
  13.         }
  14.    
  15.         try_files $uri $uri/ =404;
  16.  
  17.     }
  18.  
  19.     error_page 503 @maintenance;
  20.         location @maintenance {
  21.             if ($remote_addr !~ "^192.168.4.64"){
  22.                 rewrite ^(.*)$ /reconstruction.html break;
  23.             }
  24.     }
  25.  
  26.     location ~ \.php$ {
  27.             include snippets/fastcgi-php.conf;
  28.             fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  29.         }
  30.  
  31.         location ~ /\.ht {
  32.             deny all;
  33.         }
  34.  
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement