Advertisement
Guest User

Untitled

a guest
Apr 14th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.02 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.         listen 443 ssl;
  4.         ssl_certificate /etc/ssl/certs/dev.pem;
  5.         ssl_certificate_key /etc/ssl/certs/dev.key;
  6.        
  7.         disable_symlinks off;
  8.         client_max_body_size 50M;
  9.         client_body_buffer_size 128k;
  10.         charset utf-8;
  11.  
  12.         root /home/database/www/;
  13.         server_name dev7new.dbservers.net ;
  14.  
  15.         index index.php;
  16.  
  17. location ~* /\. {
  18.         deny all;
  19.     }
  20.  
  21.  # deny accessing php files for the /assets directory
  22.     location ~ ^/assets/.*\.php$ {
  23.         deny all;
  24.     }
  25.  
  26.  
  27.         location / {
  28.                 access_log /var/log/nginx/database.az.access.log;
  29.                 error_log /var/log/nginx/database.az.error.log;
  30.                 autoindex off;
  31.                 try_files $uri $uri/ /index.php?$args;
  32.         }
  33.  
  34.  
  35.     location ~ \.php$ {
  36.         access_log off; #/var/log/nginx/access.log;
  37.         log_not_found off;
  38.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  39.         fastcgi_pass unix:/var/run/database.az.php7.sock;
  40.         fastcgi_index index.php;
  41.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  42.         include fastcgi_params;
  43.     try_files $uri =404;
  44.     }
  45.  
  46.  
  47.      location /nginx_ping {
  48.           stub_status on;
  49.           access_log   off;
  50.           allow  5.133.228.173;
  51.           allow 85.132.13.146;
  52.          deny all;
  53.      include fastcgi_params;
  54.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  55.          fastcgi_pass unix:/var/run/database.az.php7.sock;
  56.         }
  57.  
  58.      location /nginx_status {
  59.           stub_status on;
  60.           access_log   off;
  61.           allow  5.133.228.173;
  62.       allow 85.132.13.146;
  63.          deny all;
  64.      include fastcgi_params;
  65.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  66.      fastcgi_pass unix:/var/run/database.az.php7.sock;
  67.     }
  68. }
  69.  
  70. server {
  71.         listen   80;    
  72.     server_name dev7new.dbservers.net www.dev7new.dbservers.net;
  73.         rewrite /(.*)$ https://dev7new.dbservers.net/$1 permanent;
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement