{"id":1005,"date":"2026-09-26T11:00:00","date_gmt":"2026-09-26T04:00:00","guid":{"rendered":"https:\/\/itonstartplus.com\/?p=1005"},"modified":"2026-09-26T11:00:00","modified_gmt":"2026-09-26T04:00:00","slug":"nginx-reverse-proxy-docker-compose","status":"publish","type":"post","link":"https:\/\/itonstartplus.com\/?p=1005","title":{"rendered":"\u0e17\u0e33 Reverse Proxy \u0e14\u0e49\u0e27\u0e22 Nginx \u0e41\u0e25\u0e30 Docker Compose"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Reverse proxy \u0e0a\u0e48\u0e27\u0e22\u0e43\u0e2b\u0e49\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e40\u0e02\u0e49\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e1c\u0e48\u0e32\u0e19\u0e08\u0e38\u0e14\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e41\u0e25\u0e30\u0e41\u0e2d\u0e1b\u0e2b\u0e25\u0e32\u0e22\u0e15\u0e31\u0e27\u0e41\u0e0a\u0e23\u0e4c\u0e1e\u0e2d\u0e23\u0e4c\u0e15 80\/443 \u0e23\u0e48\u0e27\u0e21\u0e01\u0e31\u0e19\u0e44\u0e14\u0e49 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49\u0e43\u0e0a\u0e49 Nginx \u0e2b\u0e19\u0e49\u0e32\u0e41\u0e2d\u0e1b\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e15\u0e31\u0e27\u0e40\u0e14\u0e35\u0e22\u0e27<\/p>\n\n\n\n<h2 id=\"\u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c\" class=\"wp-block-heading\">\u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c<\/h2>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>mkdir -p ~\/lab\/proxy &amp;&amp; cd ~\/lab\/proxy\ntouch docker-compose.yml nginx.conf<\/code><\/pre>\n\n\n\n<h2 id=\"docker-compose-yml\" class=\"wp-block-heading\">docker-compose.yml<\/h2>\n\n\n\n<pre class=\"wp-block-code language-yaml\"><code>services:\n  proxy:\n    image: nginx:stable\n    ports:\n      - \"80:80\"\n    volumes:\n      - .\/nginx.conf:\/etc\/nginx\/conf.d\/default.conf:ro\n    depends_on:\n      - app\n    restart: unless-stopped\n\n  app:\n    image: traefik\/whoami\n    restart: unless-stopped<\/code><\/pre>\n\n\n\n<h2 id=\"nginx-conf\" class=\"wp-block-heading\">nginx.conf<\/h2>\n\n\n\n<pre class=\"wp-block-code language-nginx\"><code>server {\n    listen 80;\n    server_name _;\n\n    location \/ {\n        proxy_pass http:\/\/app:80;\n        proxy_set_header Host              $host;\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 X-Forwarded-Proto $scheme;\n    }\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group is-style-itb-note is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u0e0a\u0e37\u0e48\u0e2d <code>app<\/code> \u0e43\u0e19 <code>proxy_pass<\/code> \u0e04\u0e37\u0e2d\u0e0a\u0e37\u0e48\u0e2d\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e43\u0e19\u0e44\u0e1f\u0e25\u0e4c compose Docker \u0e21\u0e35 DNS \u0e20\u0e32\u0e22\u0e43\u0e19\u0e43\u0e2b\u0e49 \u0e08\u0e36\u0e07\u0e40\u0e23\u0e35\u0e22\u0e01\u0e01\u0e31\u0e19\u0e14\u0e49\u0e27\u0e22\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e14\u0e49\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e23\u0e39\u0e49 IP<\/p>\n<\/div>\n\n\n\n<h2 id=\"\u0e23\u0e31\u0e19\u0e41\u0e25\u0e30\u0e17\u0e14\u0e2a\u0e2d\u0e1a\" class=\"wp-block-heading\">\u0e23\u0e31\u0e19\u0e41\u0e25\u0e30\u0e17\u0e14\u0e2a\u0e2d\u0e1a<\/h2>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>docker compose up -d\ncurl -i http:\/\/localhost\/\ndocker compose logs -f proxy<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group is-style-itb-tip is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u0e01\u0e48\u0e2d\u0e19\u0e23\u0e35\u0e42\u0e2b\u0e25\u0e14\u0e04\u0e48\u0e32 Nginx \u0e17\u0e38\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07 \u0e43\u0e2b\u0e49\u0e15\u0e23\u0e27\u0e08\u0e44\u0e27\u0e22\u0e32\u0e01\u0e23\u0e13\u0e4c\u0e14\u0e49\u0e27\u0e22 <code>docker compose exec proxy nginx -t<\/code> \u0e08\u0e30\u0e44\u0e14\u0e49\u0e44\u0e21\u0e48\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e40\u0e27\u0e47\u0e1a\u0e25\u0e48\u0e21\u0e40\u0e1e\u0e23\u0e32\u0e30\u0e1e\u0e34\u0e21\u0e1e\u0e4c\u0e1c\u0e34\u0e14\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e2b\u0e21\u0e32\u0e22<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0e15\u0e31\u0e49\u0e07 Nginx \u0e40\u0e1b\u0e47\u0e19 reverse proxy \u0e2b\u0e19\u0e49\u0e32\u0e40\u0e27\u0e47\u0e1a\u0e41\u0e2d\u0e1b\u0e14\u0e49\u0e27\u0e22 Docker Compose \u0e43\u0e19\u0e44\u0e1f\u0e25\u0e4c\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e2a\u0e48\u0e07 header \u0e17\u0e35\u0e48\u0e41\u0e2d\u0e1b\u0e15\u0e49\u0e2d\u0e07\u0e43\u0e0a\u0e49 \u0e40\u0e0a\u0e48\u0e19 IP \u0e08\u0e23\u0e34\u0e07\u0e02\u0e2d\u0e07\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[8,21,22,11],"class_list":["post-1005","post","type-post","status-publish","format-standard","hentry","category-devops","tag-docker","tag-nginx","tag-reverse-proxy","tag-demo"],"_links":{"self":[{"href":"https:\/\/itonstartplus.com\/index.php?rest_route=\/wp\/v2\/posts\/1005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itonstartplus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itonstartplus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itonstartplus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itonstartplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1005"}],"version-history":[{"count":0,"href":"https:\/\/itonstartplus.com\/index.php?rest_route=\/wp\/v2\/posts\/1005\/revisions"}],"wp:attachment":[{"href":"https:\/\/itonstartplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itonstartplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itonstartplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}