Advertisement
Guest User

nginx.conf

a guest
May 7th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1.  
  2. #user nobody;
  3. #Defines which Linux system user will own and run the Nginx server
  4.  
  5. worker_processes 1;
  6. #Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
  7.  
  8. #error_log logs/error.log; #error_log logs/error.log notice;
  9. #Specifies the file where server logs.
  10.  
  11. #pid logs/nginx.pid;
  12. #nginx will write its master process ID(PID).
  13.  
  14. events {
  15. worker_connections 1024;
  16. # worker_processes and worker_connections allows you to calculate maxclients value:
  17. # max_clients = worker_processes * worker_connections
  18. }
  19.  
  20.  
  21. http {
  22. include mime.types;
  23. # anything written in /opt/nginx/conf/mime.types is interpreted as if written inside the http { } block
  24.  
  25. default_type application/octet-stream;
  26. #
  27.  
  28. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  29. # '$status $body_bytes_sent "$http_referer" '
  30. # '"$http_user_agent" "$http_x_forwarded_for"';
  31.  
  32. #access_log logs/access.log main;
  33.  
  34. sendfile on;
  35. # If serving locally stored static files, sendfile is essential to speed up the server,
  36. # But if using as reverse proxy one can deactivate it
  37.  
  38. #tcp_nopush on;
  39. # works opposite to tcp_nodelay. Instead of optimizing delays, it optimizes the amount of data sent at once.
  40.  
  41. #keepalive_timeout 0;
  42. keepalive_timeout 65;
  43. # timeout during which a keep-alive client connection will stay open.
  44.  
  45. #gzip on;
  46. # tells the server to use on-the-fly gzip compression.
  47.  
  48. server {
  49. listen 80;
  50. root /srv/pufferpanel/;
  51. index index.php;
  52.  
  53. server_name 149.56.134.124;
  54.  
  55. client_max_body_size 20m;
  56. client_body_timeout 120s;
  57.  
  58. location / {
  59. try_files /public/router.php =404;
  60. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  61. fastcgi_pass unix:/var/run/php5-fpm.sock;
  62. fastcgi_index router.php;
  63. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  64. include /etc/nginx/fastcgi_params;
  65. }
  66.  
  67. location /assets {
  68. try_files /app/$uri =404;
  69. }
  70.  
  71. }
  72.  
  73. # another virtual host using mix of IP-, name-, and port-based configuration
  74. #
  75. #server {
  76. # listen 8000;
  77. # listen somename:8080;
  78. # server_name somename alias another.alias;
  79.  
  80. # location / {
  81. # root html;
  82. # index index.html index.htm;
  83. # }
  84. #}
  85.  
  86.  
  87. # HTTPS server
  88. #
  89. #server {
  90. # listen 443 ssl;
  91. # server_name localhost;
  92.  
  93. # ssl_certificate cert.pem;
  94. # ssl_certificate_key cert.key;
  95.  
  96. # ssl_session_cache shared:SSL:1m;
  97. # ssl_session_timeout 5m;
  98.  
  99. # ssl_ciphers HIGH:!aNULL:!MD5;
  100. # ssl_prefer_server_ciphers on;
  101.  
  102. # location / {
  103. # root html;
  104. # index index.html index.htm;
  105. # }
  106. #}
  107.  
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement