mahmudkuet

Maxxecom nginx configuration

Mar 30th, 2018
164
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen 80;
  3.     listen [::]:80;
  4.    
  5.     sendfile off;
  6.  
  7.     client_max_body_size 32M;      
  8.  
  9.     # SSL configuration
  10.     #
  11.     # listen 443 ssl default_server;
  12.     # listen [::]:443 ssl default_server;
  13.     #
  14.     # Note: You should disable gzip for SSL traffic.
  15.     # See: https://bugs.debian.org/773332
  16.     #
  17.     # Read up on ssl_ciphers to ensure a secure configuration.
  18.     # See: https://bugs.debian.org/765782
  19.     #
  20.     # Self signed certs generated by the ssl-cert package
  21.     # Don't use them in a production server!
  22.     #
  23.     # include snippets/snakeoil.conf;
  24.  
  25.     # Add index.php to the list if you are using PHP
  26.     index index.php index.html index.htm index.nginx-debian.html;
  27.  
  28.     root /mahmud/projects/maxxecom/public;
  29.  
  30.     server_name maxxecom.dev mahmud.localtunnel.me;
  31.  
  32.     location / {
  33.         # First attempt to serve request as file, then
  34.         # as directory, then fall back to displaying a 404.
  35.         try_files $uri $uri/ /index.php?$query_string;
  36.     }
  37.  
  38.  
  39.     location ~ \.php$ {
  40.             include snippets/fastcgi-php.conf;
  41.             fastcgi_pass unix:/run/php/php7.1-fpm.sock;
  42.         }
  43.  
  44.  
  45.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  46.     #
  47.     #location ~ \.php$ {
  48.     #   include snippets/fastcgi-php.conf;
  49.     #
  50.     #   # With php7.0-cgi alone:
  51.     #   fastcgi_pass 127.0.0.1:9000;
  52.     #   # With php7.0-fpm:
  53.     #   fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  54.     #}
  55.  
  56.     # deny access to .htaccess files, if Apache's document root
  57.     # concurs with nginx's one
  58.     #
  59.     location ~ /\.ht {
  60.         deny all;
  61.     }
  62. }
RAW Paste Data