Advertisement
Marcel-

nginx.conf

Jun 16th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1.  
  2. #user html;
  3. worker_processes 1;
  4.  
  5. #error_log logs/error.log;
  6. #error_log logs/error.log notice;
  7. #error_log logs/error.log info;
  8.  
  9. #pid logs/nginx.pid;
  10.  
  11.  
  12. events {
  13. worker_connections 1024;
  14. }
  15.  
  16.  
  17. http {
  18. include mime.types;
  19. default_type application/octet-stream;
  20.  
  21. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  22. # '$status $body_bytes_sent "$http_referer" '
  23. # '"$http_user_agent" "$http_x_forwarded_for"';
  24.  
  25. #access_log logs/access.log main;
  26.  
  27. sendfile on;
  28. #tcp_nopush on;
  29.  
  30. #keepalive_timeout 0;
  31. keepalive_timeout 65;
  32.  
  33. #gzip on;
  34.  
  35. server {
  36. listen 8888;
  37. server_name aur;
  38.  
  39. #charset koi8-r;
  40.  
  41. #access_log logs/host.access.log main;
  42. error_log /var/log/nginx/aurweb.error.log notice;
  43.  
  44. location ~ ^/[^/]+\.php($|/) {
  45. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  46. fastcgi_index index.php;
  47. fastcgi_split_path_info ^(/[^/]+\.php)(/.*)$;
  48. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  49. fastcgi_param PATH_INFO $fastcgi_path_info;
  50. include fastcgi_params;
  51. }
  52.  
  53. #error_page 404 /404.html;
  54.  
  55. # redirect server error pages to the static page /50x.html
  56. #
  57. error_page 500 502 503 504 /50x.html;
  58. location = /50x.html {
  59. root /usr/share/nginx/html;
  60. }
  61.  
  62. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  63. #
  64. #location ~ \.php$ {
  65. # proxy_pass http://127.0.0.1;
  66. #}
  67.  
  68. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  69. #
  70. #location ~ \.php$ {
  71. # root html;
  72. # fastcgi_pass 127.0.0.1:9000;
  73. # fastcgi_index index.php;
  74. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  75. # include fastcgi_params;
  76. #}
  77.  
  78. # deny access to .htaccess files, if Apache's document root
  79. # concurs with nginx's one
  80. #
  81. #location ~ /\.ht {
  82. # deny all;
  83. #}
  84. }
  85.  
  86. root /srv/http/aurweb/web/html;
  87. index index.php index.html index.htm;
  88.  
  89. # another virtual host using mix of IP-, name-, and port-based configuration
  90. #
  91. #server {
  92. # listen 8000;
  93. # listen somename:8080;
  94. # server_name somename alias another.alias;
  95.  
  96. # location / {
  97. # root html;
  98. # index index.html index.htm;
  99. # }
  100. #}
  101.  
  102.  
  103. # HTTPS server
  104. #
  105. #server {
  106. # listen 443 ssl;
  107. # server_name localhost;
  108.  
  109. # ssl_certificate cert.pem;
  110. # ssl_certificate_key cert.key;
  111.  
  112. # ssl_session_cache shared:SSL:1m;
  113. # ssl_session_timeout 5m;
  114.  
  115. # ssl_ciphers HIGH:!aNULL:!MD5;
  116. # ssl_prefer_server_ciphers on;
  117.  
  118. # location / {
  119. # root html;
  120. # index index.html index.htm;
  121. # }
  122. #}
  123.  
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement