Advertisement
jxsl13

Untitled

Oct 9th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. server {
  2. listen 94.23.157.157:80; # für teewrolds.tw
  3. listen 188.165.136.252:80; # für uptee.net
  4. server_name uptee.teeworlds.tw servers.uptee.net;
  5. if ($host != $server_name) {
  6. return 444;
  7. # address and port accepted by the server
  8. #listen 80; ## listen for ipv4
  9. #listen [::]:80 default ipv6only=on; ## listen for ipv6
  10.  
  11. # server IP to compare against http requests, uncomment and set proper value.
  12. # Enter the hostname or IP address you use to reach this server. If you run on your dev environment it might be localhost.
  13. # Note: If your vb install is in a folder inside your domain <mysite>/forum/install/path please change location directives defined below to include the path first. e.G:
  14. # vbulletin.com/forum
  15. #
  16. # css directive would be:
  17. # location = /forum/css\.php {
  18. # rewrite ^ /forum/core/css.php break;
  19. #}
  20. #server_name 127.0.0.1;
  21.  
  22. # document root for request, uncomment and set proper value
  23. # this should reflect the path that your vBulletin is installed in.
  24. # This is usually /var/www/public_html/forumpath
  25. #root /var/www/public_html/forumpath;
  26. index index.php index.html index.htm;
  27.  
  28. # log files, uncomment and set proper values
  29. #access_log /usr/share/nginx/www/vb/logs/access.log;
  30. #error_log /usr/share/nginx/www/vb/logs/nginx_error.log;
  31.  
  32. # configuration rules
  33. # legacy css being handled separate for performance
  34. location = /css\.php {
  35. rewrite ^ /core/css.php break;
  36. }
  37.  
  38. # make install available from presentation
  39. location ^~ /install {
  40. rewrite ^/install/ /core/install/ break;
  41. }
  42.  
  43. # any request to not existing item gets redirected through routestring
  44. location / {
  45. if (!-f $request_filename) {
  46. rewrite ^/(.*)$ /index.php?routestring=$1 last;
  47. }
  48. }
  49.  
  50. # make admincp available from presentation
  51. location ^~ /admincp {
  52. if (!-f $request_filename) {
  53. rewrite ^/admincp/(.*)$ /index.php?routestring=admincp/$1 last;
  54. }
  55. }
  56.  
  57. # process any php scripts, not found gets redirected through routestring
  58. location ~ \.php$ {
  59. # handles legacy scripts
  60. if (!-f $request_filename) {
  61. rewrite ^/(.*)$ /index.php?routestring=$1 break;
  62. }
  63.  
  64. fastcgi_split_path_info ^(.+\.php)(.*)$;
  65. fastcgi_pass php5;
  66. fastcgi_index index.php;
  67. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  68. include fastcgi_params;
  69. fastcgi_param QUERY_STRING $query_string;
  70. fastcgi_param REQUEST_METHOD $request_method;
  71. fastcgi_param CONTENT_TYPE $content_type;
  72. fastcgi_param CONTENT_LENGTH $content_length;
  73. fastcgi_intercept_errors on;
  74. fastcgi_ignore_client_abort off;
  75. fastcgi_connect_timeout 60;
  76. fastcgi_send_timeout 180;
  77. fastcgi_read_timeout 180;
  78. fastcgi_buffers 256 16k;
  79. fastcgi_buffer_size 32k;
  80. fastcgi_temp_file_write_size 256k;
  81. }
  82. }
  83.  
  84. upstream php5 {
  85. # address to accept FastCGI requests. Make sure you set the right value under your fast cgi conf.
  86. # e.g.- Ubuntu 12.10 using php5-fpm Ubuntu /etc/php5/fpm/pool.d/www.conf
  87. server unix:/run/php-fpm/php-fpm-uptee.sock;
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement