Guest User

Untitled

a guest
Aug 9th, 2019
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.89 KB | None | 0 0
  1. server {
  2.         listen 80;
  3.         listen [::]:80;
  4.  
  5.         server_name example.com www.example.com;
  6.         return 301 https://$server_name$request_uri;
  7. }
  8.  
  9. server {
  10.         listen 443 ssl http2;
  11.         listen [::]:443 ssl http2;
  12.  
  13.         include snippets/ssl-example.com.conf;
  14.         include snippets/ssl-params.conf;
  15.  
  16.         root /var/www/html/quickstart/public;
  17.  
  18.         index index.php index.html index.htm index.nginx-debian.html;
  19.  
  20.         server_name example.com www.example.com;
  21.  
  22.         location / {
  23.                 try_files $uri $uri/ /index.php?$query_string;
  24.         }
  25.  
  26.         location ~ \.php$ {
  27.                 include snippets/fastcgi-php.conf;
  28.                 fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  29.         }
  30.  
  31.         location ~ /\.ht {
  32.                 deny all;
  33.         }
  34.  
  35.         location ~ /.well-known {
  36.                 allow all;
  37.         }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment