Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. server {
  2.  
  3. # Port that the web server will listen on.
  4. listen 80;
  5.  
  6. # Host that will serve this project.
  7. server_name inglavstrah.local;
  8.  
  9. # Useful logs for debug.
  10. access_log /var/log/nginx/inglavstrah-access.log;
  11. error_log /var/log/nginx/inglavstrah-error.log;
  12. rewrite_log on;
  13.  
  14. # The location of our projects public directory.
  15. root /var/www/inglavstrah/public;
  16.  
  17. # Point index to the Laravel front controller.
  18. index index.php;
  19.  
  20. location / {
  21.  
  22. # URLs to attempt, including pretty ones.
  23. try_files $uri $uri/ /index.php?$query_string;
  24.  
  25. }
  26.  
  27. # Remove trailing slash to please routing system.
  28. if (!-d $request_filename) {
  29. rewrite ^/(.+)/$ /$1 permanent;
  30. }
  31.  
  32. # PHP FPM configuration.
  33. location ~* \.php$ {
  34. fastcgi_pass 127.0.0.1:9001;
  35. fastcgi_index index.php;
  36. fastcgi_split_path_info ^(.+\.php)(.*)$;
  37. include /etc/nginx/fastcgi_params;
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. }
  40.  
  41. # We don't need .ht files with nginx.
  42. location ~ /\.ht {
  43. deny all;
  44. }
  45.  
  46. # Set header expirations on per-project basis
  47. location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
  48. expires 365d;
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement