Advertisement
emcniece

/etc/nginx/conf.d/linux-dash.conf

Jul 17th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. # /etc/nginx/conf.d/linux-dash.conf
  2. server {
  3. server_name linux-dash.erictest;
  4. root /var/www/linux-dash;
  5. index index.html index.php;
  6. access_log /var/log/nginx/access.log;
  7. error_log /var/log/nginx/error.log;
  8.  
  9. # Cache static files for as long as possible
  10. location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ {
  11. try_files $uri =404;
  12. expires max;
  13. access_log off;
  14. add_header Pragma public;
  15. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  16. }
  17.  
  18. # if hosting in a sub folder, setup a new location
  19. # replace `/linus-dash` with the folder name eg. `/folder_name`
  20. #location /linux-dash {
  21. # index index.html index.php;
  22. #}
  23.  
  24. # Pass PHP requests on to PHP-FPM using sockets
  25. location ~ \.php(/|$) {
  26. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  27. #fastcgi_pass unix:/run/linux-dash.sock;
  28. fastcgi_pass linux-dash-sock:9000;
  29. # fastcgi_pass localhost:9000; # using TCP/IP stack
  30. if (!-f $document_root$fastcgi_script_name) {
  31. return 404;
  32. }
  33. try_files $uri $uri/ /index.php?$args;
  34. include fastcgi_params;
  35. }
  36. }
  37.  
  38. upstream linux-dash-sock{
  39. server unix:/var/run/linux-dash.sock;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement