Advertisement
arieonline

nginx+php5-fpm

Feb 6th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. root@vps11:~# cat /etc/nginx/nginx.conf
  2. user www-data;
  3.  
  4. worker_processes 4;
  5. pid /var/run/nginx.pid;
  6. events {
  7. multi_accept on;
  8. worker_connections 1024;
  9. }
  10. http {
  11. sendfile on;
  12. tcp_nopush on;
  13. tcp_nodelay on;
  14. keepalive_timeout 65;
  15. types_hash_max_size 2048;
  16. server_tokens off;
  17. include /etc/nginx/mime.types;
  18. default_type application/octet-stream;
  19. access_log /var/log/nginx/access.log;
  20. error_log /var/log/nginx/error.log;
  21. client_max_body_size 32M;
  22. client_header_buffer_size 8m;
  23. large_client_header_buffers 8 8m;
  24.  
  25. fastcgi_buffer_size 8m;
  26. fastcgi_buffers 8 8m;
  27.  
  28. fastcgi_read_timeout 600;
  29.  
  30. include /etc/nginx/conf.d/*.conf;
  31. }
  32.  
  33. root@vps11:~# cat /etc/nginx/conf.d/vps.conf
  34. server {
  35. listen 80;
  36. server_name 127.0.0.1 localhost;
  37. access_log /var/log/nginx/vps-access.log;
  38. error_log /var/log/nginx/vps-error.log error;
  39. root /home/vps/public_html;
  40.  
  41. location / {
  42. index index.html index.htm index.php;
  43. try_files $uri $uri/ /index.php?$args;
  44. autoindex on;
  45. }
  46. location ~ \.php$ {
  47. include /etc/nginx/fastcgi_params;
  48. fastcgi_pass 127.0.0.1:9000;
  49. fastcgi_index index.php;
  50. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement