Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 51.254.88.34:80;
- server_name uptee.net;
- if ($host != $server_name) {
- return 444;
- # address and port accepted by the server
- #listen 80; ## listen for ipv4
- #listen [::]:80 default ipv6only=on; ## listen for ipv6
- # server IP to compare against http requests, uncomment and set proper value.
- # Enter the hostname or IP address you use to reach this server. If you run on your dev environment it might be localhost.
- # 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:
- # vbulletin.com/forum
- #
- # css directive would be:
- # location = /forum/css\.php {
- # rewrite ^ /forum/core/css.php break;
- #}
- }
- server_name_in_redirect off;
- gzip on;
- gzip_http_version 1.1;
- gzip_comp_level 6;
- gzip_min_length 1100;
- gzip_buffers 4 8k;
- gzip_types text/plain application/xhtml+xml text/css application/xml application/xml+rss text/javascript application/javascrip$
- gzip_proxied any;
- gzip_disable "MSIE [1-6]\.";
- #access_log /var/log/nginx/localhost.access_log main;
- #error_log /var/log/nginx/localhost.error_log info;
- root /home/uptee/website/;
- index index.php index.html index.htm default.html default.htm;
- # Support Clean (aka Search Engine Friendly) URLs
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- # deny running scripts inside writable directories
- location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
- return 403;
- error_page 403 /403_error.html;
- }
- location ~ \.php$ {
- root /home/uptee/website/;
- fastcgi_pass unix:/run/php-fpm/php-fpm-uptee.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_read_timeout 300;
- # handles legacy scripts
- if (!-f $request_filename) {
- rewrite ^/(.*)$ /index.php?routestring=$1 break;
- }
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- fastcgi_pass php5;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_param QUERY_STRING $query_string;
- fastcgi_param REQUEST_METHOD $request_method;
- fastcgi_param CONTENT_TYPE $content_type;
- fastcgi_param CONTENT_LENGTH $content_length;
- fastcgi_intercept_errors on;
- fastcgi_ignore_client_abort off;
- fastcgi_connect_timeout 60;
- fastcgi_send_timeout 180;
- fastcgi_read_timeout 180;
- fastcgi_buffers 256 16k;
- fastcgi_buffer_size 32k;
- fastcgi_temp_file_write_size 256k;
- }
- }
- # caching of files
- location ~* \.(ico|pdf|flv)$ {
- expires 1y;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
- expires 14d;
- }
- }
- upstream php5 {
- # address to accept FastCGI requests. Make sure you set the right value under your fast cgi conf.
- # e.g.- Ubuntu 12.10 using php5-fpm Ubuntu /etc/php5/fpm/pool.d/www.conf
- server unix:/run/php-fpm/php-fpm-uptee.sock;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement