Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name www.domian.com;
- rewrite ^(.*) http://domian.com$1 permanent;
- }
- server {
- listen 80 default_server;
- # access_log off;
- access_log /home/domian.com/logs/access.log;
- # error_log off;
- error_log /home/domian.com/logs/error.log;
- root /home/domian.com/public_html;
- index index.php index.html index.htm;
- server_name domian.com;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- # Custom configuration
- include /home/domian.com/public_html/*.conf;
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_connect_timeout 1000;
- fastcgi_send_timeout 1000;
- fastcgi_read_timeout 1000;
- fastcgi_buffer_size 256k;
- fastcgi_buffers 4 256k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_intercept_errors on;
- fastcgi_param SCRIPT_FILENAME /home/domian.com/public_html$fastcgi_script_name;
- }
- location /nginx_status {
- stub_status on;
- access_log off;
- }
- location /php_status {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /home/domian.com/public_html$fastcgi_script_name;
- include /etc/nginx/fastcgi_params;
- }
- location ~ /\. {
- deny all;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|eot|svg|ttf|woff)$ {
- gzip_static off;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- access_log off;
- expires 30d;
- break;
- }
- location ~* \.(txt|js|css)$ {
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- access_log off;
- expires 30d;
- break;
- }
- }
- server {
- listen 8888;
- access_log off;
- log_not_found off;
- error_log /home/domian.com/logs/nginx_error.log;
- root /home/domian.com/private_html;
- index index.php index.html index.htm;
- server_name domian.com;
- location / {
- try_files $uri $uri/ /index.php;
- }
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_connect_timeout 1000;
- fastcgi_send_timeout 1000;
- fastcgi_read_timeout 1000;
- fastcgi_buffer_size 256k;
- fastcgi_buffers 4 256k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_intercept_errors on;
- fastcgi_param SCRIPT_FILENAME /home/domian.com/private_html$fastcgi_script_name;
- }
- location ~ /\. {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement