{"id":63,"date":"2015-01-24T13:21:46","date_gmt":"2015-01-24T05:21:46","guid":{"rendered":"http:\/\/blog.qiaogen.com\/?p=63"},"modified":"2015-01-24T22:29:40","modified_gmt":"2015-01-24T14:29:40","slug":"etcnginxconf-ddefault-conf","status":"publish","type":"post","link":"https:\/\/www.sangqiao.com\/blog\/archives\/63","title":{"rendered":"\/etc\/nginx\/conf.d\/default.conf"},"content":{"rendered":"<pre>\r\n\r\nserver {\r\n    listen       80\tdefault;\r\n    server_name  localhost;\r\n\r\n    #charset koi8-r;\r\n    #access_log  \/var\/log\/nginx\/log\/host.access.log  main;\r\n\r\n    location \/ {\r\n        root   \/usr\/share\/nginx\/html;\r\n        proxy_redirect off ;\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        client_max_body_size 50m;\r\n        client_body_buffer_size 256k;\r\n        proxy_connect_timeout 30;\r\n        proxy_send_timeout 30;\r\n        proxy_read_timeout 60;\r\n        proxy_buffer_size 256k;\r\n        proxy_buffers 4 256k;\r\n        proxy_busy_buffers_size 256k;\r\n        proxy_temp_file_write_size 256k;\r\n        proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;\r\n        proxy_max_temp_file_size 128m;\r\n        proxy_pass http:\/\/10.100.100.100;\r\n    }\r\n\r\n    #error_page  404              \/404.html;\r\n\r\n    # redirect server error pages to the static page \/50x.html\r\n    #\r\n    error_page   500 502 503 504  \/50x.html;\r\n    location = \/50x.html {\r\n        root   \/usr\/share\/nginx\/html;\r\n    }\r\n\r\n    # proxy the PHP scripts to Apache listening on 127.0.0.1:80\r\n    #\r\n    #location ~ \\.php$ {\r\n    #    proxy_pass   http:\/\/127.0.0.1;\r\n    #}\r\n\r\n    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000\r\n    #\r\n    #location ~ \\.php$ {\r\n    #    root           html;\r\n    #    fastcgi_pass   127.0.0.1:9000;\r\n    #    fastcgi_index  index.php;\r\n    #    fastcgi_param  SCRIPT_FILENAME  \/scripts$fastcgi_script_name;\r\n    #    include        fastcgi_params;\r\n    #}\r\n\r\n    # deny access to .htaccess files, if Apache's document root\r\n    # concurs with nginx's one\r\n    #\r\n    #location ~ \/\\.ht {\r\n    #    deny  all;\r\n    #}\r\n}\r\n\r\nserver {\r\n    listen       2082\tdefault;\r\n    server_name  localhost;\r\n\r\n    #charset koi8-r;\r\n    #access_log  \/var\/log\/nginx\/log\/host.access.log  main;\r\n\r\n    location \/ {\r\n        root   \/usr\/share\/nginx\/html;\r\n        proxy_redirect off ;\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        client_max_body_size 50m;\r\n        client_body_buffer_size 256k;\r\n        proxy_connect_timeout 30;\r\n        proxy_send_timeout 30;\r\n        proxy_read_timeout 60;\r\n        proxy_buffer_size 256k;\r\n        proxy_buffers 4 256k;\r\n        proxy_busy_buffers_size 256k;\r\n        proxy_temp_file_write_size 256k;\r\n        proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;\r\n        proxy_max_temp_file_size 128m;\r\n        proxy_pass http:\/\/10.100.100.100:2082;\r\n    }\r\n\r\n    #error_page  404              \/404.html;\r\n\r\n    # redirect server error pages to the static page \/50x.html\r\n    #\r\n    error_page   500 502 503 504  \/50x.html;\r\n    location = \/50x.html {\r\n        root   \/usr\/share\/nginx\/html;\r\n    }\r\n\r\n    # proxy the PHP scripts to Apache listening on 127.0.0.1:80\r\n    #\r\n    #location ~ \\.php$ {\r\n    #    proxy_pass   http:\/\/127.0.0.1;\r\n    #}\r\n\r\n    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000\r\n    #\r\n    #location ~ \\.php$ {\r\n    #    root           html;\r\n    #    fastcgi_pass   127.0.0.1:9000;\r\n    #    fastcgi_index  index.php;\r\n    #    fastcgi_param  SCRIPT_FILENAME  \/scripts$fastcgi_script_name;\r\n    #    include        fastcgi_params;\r\n    #}\r\n\r\n    # deny access to .htaccess files, if Apache's document root\r\n    # concurs with nginx's one\r\n    #\r\n    #location ~ \/\\.ht {\r\n    #    deny  all;\r\n    #}\r\n}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>server { listen 80 default; server_name localhost; #cha [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/posts\/63"}],"collection":[{"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":3,"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/posts\/63\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sangqiao.com\/blog\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}