Advertisement
emcniece

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

Jul 17th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 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:9001;
  29. fastcgi_pass 127.0.0.1:9000;
  30. # fastcgi_pass unix:/var/run/php5-fpm.sock
  31. # fastcgi_pass localhost:9000; # using TCP/IP stack
  32.  
  33. #if (!-f $document_root$fastcgi_script_name) {
  34. # return 404;
  35. #}
  36.  
  37. try_files $uri $uri/ /index.php?$args;
  38. # include fastcgi_params;
  39. include fastcgi.conf;
  40. }
  41. }
  42.  
  43. upstream linux-dash-sock{
  44. # server unix:/var/run/linux-dash.sock;
  45. server 127.0.0.1:9000;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement