{"id":37,"date":"2022-04-03T07:20:48","date_gmt":"2022-04-02T23:20:48","guid":{"rendered":"http:\/\/192.168.0.138:8083\/?p=37"},"modified":"2022-04-03T07:32:34","modified_gmt":"2022-04-02T23:32:34","slug":"nginx-configuration-reverse-proxy","status":"publish","type":"post","link":"http:\/\/192.168.0.138:8083\/nginx-configuration-reverse-proxy\/","title":{"rendered":"Nginx configuration reverse proxy"},"content":{"rendered":"\n

Reverse proxy<\/p>\n\n\n\n

#PROXY-START\/\nlocation  ~* \\.(php|jsp|cgi|asp|aspx)$\n{\n    proxy_pass https:\/\/clrs.me;\n    proxy_set_header Host clrs.me;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header REMOTE-HOST $remote_addr;\n    proxy_ssl_name clrs.me;\n\tproxy_ssl_server_name on;\n    proxy_connect_timeout 300s;\n\tproxy_send_timeout 300s;\n\tproxy_read_timeout 300s;\n}\n\nlocation \/\n{\n    proxy_pass https:\/\/clrs.me;\n    proxy_set_header Host clrs.me;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header REMOTE-HOST $remote_addr;\n     proxy_ssl_name clrs.me;\n\tproxy_ssl_server_name on;\n    add_header X-Cache $upstream_cache_status;\n    proxy_connect_timeout 300s;\n\tproxy_send_timeout 300s;\n\tproxy_read_timeout 300s;\n    #Set Nginx Cache\n    \n    \tadd_header Cache-Control no-cache;\n    expires 12h;\n}\n\n#PROXY-END\/<\/code><\/pre>\n\n\n\n

Reverse proxy restricted path<\/p>\n\n\n\n

#PROXY-START\/\nlocation  ~* \\.(php|jsp|cgi|asp|aspx)$\n{\n    proxy_pass https:\/\/clrs.me;\n    proxy_set_header Host clrs.me;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header REMOTE-HOST $remote_addr;\n    proxy_ssl_name clrs.me;\n\tproxy_ssl_server_name on;\n}\n#according to routing config\nlocation \/3rd\/pay\n{\n    proxy_pass https:\/\/clrs.me;\n    proxy_set_header Host clrs.me;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header REMOTE-HOST $remote_addr;\n    proxy_ssl_name clrs.me;\n\tproxy_ssl_server_name on;\n    add_header X-Cache $upstream_cache_status;\n    \n    #Set Nginx Cache\n    \n    add_header Cache-Control no-cache;\n    expires 12h;\n}\n\n#Match multiple routes\nlocation ~* \/3rd\/(outtime|save).html\n{\n    proxy_pass https:\/\/clrs.me;\n    proxy_set_header Host clrs.me;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header REMOTE-HOST $remote_addr;\n    proxy_ssl_name clrs.me;\n\tproxy_ssl_server_name on;\n    add_header X-Cache $upstream_cache_status;\n    \n    #Set Nginx Cache\n    \n    add_header Cache-Control no-cache;\n    expires 12h;\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

Reverse proxy Reverse proxy restricted path<\/p>\n","protected":false},"author":1,"featured_media":31,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[8],"_links":{"self":[{"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/posts\/37"}],"collection":[{"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":1,"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":38,"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/posts\/37\/revisions\/38"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/media\/31"}],"wp:attachment":[{"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/192.168.0.138:8083\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}