Advertisement
Guest User

Untitled

a guest
Sep 15th, 2010
318
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ### nginx server config
  2. server {
  3. listen 80;
  4. server_name DOMAIN.com www.DOMAIN.com;
  5.  
  6. access_log /var/log/nginx/DOMAIN.com.access.log;
  7. error_log /var/log/nginx/DOMAIN.com.error.log;
  8.  
  9. location / {
  10. root /var/www/DOMAIN/;
  11. index index.html index.htm index.php;
  12.  
  13. }
  14.  
  15. location /mailman/ {
  16. root /usr/lib/cgi-bin;
  17. fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
  18. fastcgi_param QUERY_STRING $query_string;
  19. fastcgi_param REQUEST_METHOD $request_method;
  20. fastcgi_param CONTENT_TYPE $content_type;
  21. fastcgi_param CONTENT_LENGTH $content_length;
  22. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  23. fastcgi_param REQUEST_URI $request_uri;
  24. fastcgi_param DOCUMENT_URI $document_uri;
  25. fastcgi_param DOCUMENT_ROOT $document_root;
  26. fastcgi_param SERVER_PROTOCOL $server_protocol;
  27. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  28. fastcgi_param SERVER_SOFTWARE nginx;
  29. fastcgi_param REMOTE_ADDR $remote_addr;
  30. fastcgi_param REMOTE_PORT $remote_port;
  31. fastcgi_param SERVER_ADDR $server_addr;
  32. fastcgi_param SERVER_PORT $server_port;
  33. fastcgi_param SERVER_NAME $server_name;
  34. fastcgi_param REMOTE_USER $remote_user;
  35. fastcgi_param PATH_INFO $fastcgi_path_info;
  36. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  37. fastcgi_pass unix:/tmp/cgi.sock;
  38. }
  39.  
  40. location /images/mailman {
  41. alias /var/lib/mailman/icons;
  42. }
  43.  
  44. location /pipermail {
  45. alias /var/lib/mailman/archives/public;
  46. autoindex on;
  47. }
  48.  
  49. error_page 404 /index.php;
  50.  
  51. location ~ .php$ {
  52. fastcgi_pass 127.0.0.1:9000;
  53. fastcgi_index index.php;
  54.  
  55. fastcgi_param SCRIPT_FILENAME /var/www/tuftscrafts$fastcgi_script_name;
  56. include /etc/nginx/fastcgi_params;
  57. }
  58. }
  59.  
  60.  
  61. #### fastcgi_params
  62.  
  63.  
  64. fastcgi_param QUERY_STRING $query_string;
  65. fastcgi_param REQUEST_METHOD $request_method;
  66. fastcgi_param CONTENT_TYPE $content_type;
  67. fastcgi_param CONTENT_LENGTH $content_length;
  68.  
  69. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  70. fastcgi_param REQUEST_URI $request_uri;
  71. fastcgi_param DOCUMENT_URI $document_uri;
  72. fastcgi_param DOCUMENT_ROOT $document_root;
  73. fastcgi_param SERVER_PROTOCOL $server_protocol;
  74.  
  75. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  76. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  77.  
  78. fastcgi_param REMOTE_ADDR $remote_addr;
  79. fastcgi_param REMOTE_PORT $remote_port;
  80. fastcgi_param SERVER_ADDR $server_addr;
  81. fastcgi_param SERVER_PORT $server_port;
  82. fastcgi_param SERVER_NAME $server_name;
  83.  
  84. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  85. fastcgi_param REDIRECT_STATUS 200;
Advertisement
RAW Paste Data Copied
Advertisement