Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. server { # listen 80 ; # listen [::]:80 default_server;
  2.  
  3. # SSL configuration
  4. #
  5. listen 443 ssl default_server;
  6. listen [::]:443 ssl default_server;
  7. #
  8. # Note: You should disable gzip for SSL traffic.
  9. # See: https://bugs.debian.org/773332
  10. #
  11. # Read up on ssl_ciphers to ensure a secure configuration.
  12. # See: https://bugs.debian.org/765782
  13. #
  14. # Self signed certs generated by the ssl-cert package
  15. # Don't use them in a production server!
  16. #
  17. # include snippets/snakeoil.conf;
  18.  
  19. root /var/www/laravel/public;
  20.  
  21. # Add index.php to the list if you are using PHP
  22. index index.php index.html index.htm index.nginx-debian.html;
  23.  
  24. server_name example.com ;
  25.  
  26. ssl on;
  27. ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
  28. ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
  29.  
  30.  
  31. location / {
  32. # First attempt to serve request as file, then
  33. # as directory, then fall back to displaying a 404.
  34. try_files $uri $uri/ /index.php?$query_string;
  35. }
  36.  
  37. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  38.  
  39. location ~ .php$ {
  40. include snippets/fastcgi-php.conf;
  41.  
  42. # # With php7.0-cgi alone:
  43. # fastcgi_pass 127.0.0.1:9000;
  44.  
  45.  
  46.  
  47. # # With php7.0-fpm:
  48. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  49. }
  50.  
  51. # deny access to .htaccess files, if Apache's document root
  52. # concurs with nginx's one
  53. #
  54. location ~ /.ht {
  55. deny all;
  56. }
  57. location ~ /.well-known {
  58. allow all;}
  59.  
  60.  
  61. }
  62.  
  63.  
  64. # Virtual Host configuration for example.com
  65. #
  66. # You can move that to a different file under sites-available/ and symlink that
  67. # to sites-enabled/ to enable it.
  68. #
  69. server {
  70. listen 80;
  71. # listen [::]:80;
  72. #
  73. server_name example.com;
  74. #
  75. # root /var/www/example.com;
  76. # index index.html;
  77. #
  78. # location / {
  79. # try_files $uri $uri/ =404;
  80. # }
  81.  
  82. return 301 https://example.com$request_uri;
  83. }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement