Advertisement
jxsl13

Untitled

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