Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name xxxxxx;
  4.  
  5. location ~ /\.ht {
  6. deny all;
  7. }
  8.  
  9. location ~ /\.svn {
  10. deny all;
  11. }
  12.  
  13.  
  14. location /fg152 {
  15. root /home/sites/domain/;
  16. index index.php;
  17. try_files $uri $uri/ /fg152/index.php;
  18. }
  19.  
  20.  
  21. location / {
  22. root /home/sites/domain/;
  23. index index.php index.html index.htm;
  24. # PHPBB SEO REWRITE RULES - ADVANCED
  25. # AUTHOR : dcz www.phpbb-seo.com
  26. # STARTED : 01/2006
  27.  
  28. rewrite ^/(forum|[a-z0-9_-]*-f)([0-9]+)/?(page([0-9]+)\.html)?$ /viewforum.php?f=$2&start=$4 last;
  29. rewrite ^/(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$
  30. /viewtopic.php?f=$2&t=$4&start=$6 last;
  31. rewrite ^/([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$3&start=$5 last;
  32. rewrite ^/resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /download/file.php?id=$2&t=$1 last;
  33. rewrite ^/member/([^/]+)/?$ /memberlist.php?mode=viewprofile&un=$1 last;
  34. rewrite ^/member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 last;
  35. rewrite ^/(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$2&start=$4 last;
  36. rewrite ^/post([0-9]+)\.html$ /viewtopic.php?p=$1 last;
  37. rewrite ^/active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics last;
  38. rewrite ^/unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics last;
  39. rewrite ^/newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics last;
  40. rewrite ^/unreadposts(-([0-9]+))?\.html$ /search.php?search_id=unreadposts&start=$2 last;
  41. rewrite ^/the-team\.html$ /memberlist.php?mode=leaders last;
  42. rewrite ^/([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /viewforum.php?forum_uri=$1&start=$3 last;
  43. rewrite ^/.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /$1 last;
  44. rewrite ^/.+/(styles/.*|images/.*)/$ /$1last;
  45. if (!-e $request_filename) {
  46. rewrite ^/([a-z0-9_/-]+)/?(page([0-9]+)\.html)?$ /viewforum.php?forum_uri=$1&start=$3 last;
  47. break;
  48. }
  49. # END PHPBB PAGES
  50. }
  51.  
  52.  
  53. location ~ \.php {
  54. root /home/sites/domain/;
  55. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  56. # A handy function that became available in 0.7.31 that breaks down
  57. # The path information based on the provided regex expression
  58. # This is handy for requests such as file.php/some/paths/here/
  59.  
  60. fastcgi_param PATH_INFO $fastcgi_path_info;
  61. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  62.  
  63. fastcgi_param QUERY_STRING $query_string;
  64. fastcgi_param REQUEST_METHOD $request_method;
  65. fastcgi_param CONTENT_TYPE $content_type;
  66. fastcgi_param CONTENT_LENGTH $content_length;
  67.  
  68. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  69. fastcgi_param SCRIPT_FILENAME $document_root$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;
  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. fastcgi_pass unix:/etc/phpcgi/php-cgi.socket;
  84. fastcgi_index index.php;
  85. }
  86.  
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement