Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name wogames.info mail.wogames.info;
  4.  
  5. return 301 https://$host$request_uri;
  6. }
  7.  
  8. server {
  9. listen 443 ssl;
  10.  
  11. ssl_certificate /etc/letsencrypt/live/wogames.info/fullchain.pem;
  12. ssl_certificate_key /etc/letsencrypt/live/wogames.info/privkey.pem;
  13.  
  14. error_log /var/log/nginx/error.log;
  15. root /var/www/wogames;
  16.  
  17. server_name wogames.info mail.wogames.info;
  18.  
  19. location /public/ {
  20. index index.html;
  21. try_files $uri $uri/;
  22. }
  23.  
  24. location / {
  25. index index.php;
  26. try_files $uri $uri/ /index.php?q=$uri&$args;
  27. }
  28.  
  29.  
  30. error_page 404 /404.html;
  31.  
  32. error_page 500 502 503 504 /50x.html;
  33.  
  34. # pass the PHP scripts to FastCGI server listening on the php-fpm socket
  35. location ~ \.php$ {
  36. try_files $uri =404;
  37. fastcgi_pass unix:/var/run/php5-fpm.sock;
  38. fastcgi_index index.php;
  39. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  40. include fastcgi_params;
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement