node.js - How do I access a server on localhost with nginx docker container? - Stack Overflow (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (Stack Overflow) (https://stackoverflow.com/opensearch.xml) (https://stackoverflow.com/questions/27810076/how-do-i-access-a-server-on-localhost-with-nginx-docker-container) (Feed for question 'How do I access a server on localhost with nginx docker container?') (https://stackoverflow.com/feeds/question/27810076) (site logo) Join Stack Overflow By clicking “Sign up”, you agree to our (https://stackoverflow.com/legal/terms-of-service/public) terms of service and acknowledge you have read our (https://stackoverflow.com/legal/privacy-policy) privacy policy . Sign up with Google Sign up with GitHub OR Email Password (8+ characters (at least 1 letter & 1 number)) Sign up Already have an account? (https://stackoverflow.com/users/login) Log in Skip to main content (https://stackoverflow.com/) Stack Overflow (https://stackoverflow.co/) About Products (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav-bar&utm_content=overflowai) OverflowAI (Search…) (Click to show search) (https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f27810076%2fhow-do-i-access-a-server-on-localhost-with-nginx-docker-container) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f27810076%2fhow-do-i-access-a-server-on-localhost-with-nginx-docker-container) Sign up Let's set up your homepage Select a few topics you're interested in: python javascript c# reactjs java android html flutter c++ node.js typescript css r php angular next.js spring-boot machine-learning sql excel ios azure docker Or search from our full list: (Search) Next You’ll be prompted to create an account to view your personalized homepage. (https://stackoverflow.com/) Home (https://stackoverflow.com/questions) Questions (https://stackoverflow.com/tags) Tags (https://stackoverflow.com/beta/discussions) Discussions Labs (https://chat.stackoverflow.com/?tab=all&sort=active) Chat (https://stackoverflow.com/users) Users (https://stackoverflow.com/jobs?source=so-left-nav) Jobs (https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&so_source=SiteNav) Companies Collectives Communities for your favorite technologies. (https://stackoverflow.com/collectives-all) Explore all Collectives Teams Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Try Teams for free (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Explore Teams (Illustration of upvote icon after it is clicked) Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? Instead, you can save this post to reference later. Save this post for later Not now (Illustration of upvote icon after it is clicked) Hang on, you can't downvote just yet. You'll need to complete a few actions and gain 125 reputation points before being able to downvote. Casting downvotes indicate issues with quality, effort, or accuracay of a post. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? Instead, you can try suggesting an edit to improve the post. Suggest edit No thanks (Illustration of upvote icon after it is clicked) Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? To start gaining reputation, try answering a related question. node.js nginx docker Find related question Not now (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (https://stackoverflow.com/questions/27810076/how-do-i-access-a-server-on-localhost-with-nginx-docker-container) How do I access a server on localhost with nginx docker container? (https://stackoverflow.com/questions/ask) Ask Question (2015-01-07 01:27:11Z) Asked 10 years, 3 months ago Modified (https://stackoverflow.com/questions/27810076/how-do-i-access-a-server-on-localhost-with-nginx-docker-container?lastactivity) (2024-06-20 06:08:00Z) 10 months ago (Viewed 98,078 times) Viewed 98k times This question shows research effort; it is useful and clear 75 (This question does not show any research effort; it is unclear or not useful) Save this question. (https://stackoverflow.com/posts/27810076/timeline) Show activity on this post. I'm trying to use a dockerized version of nginx as a proxy server for my node (ExpressJS) application. Without any configuration to nginx and publishing port 80 for the container, I am able to see the default nginx landing page. So I know that much is working. Now I can mount my sites-enabled directory that contains the configuration for proxy_pass localhost:3000 . I have my node application running locally (not in any Docker container) and I can access it via port 3000 (i.e. localhost:3000 ). However, I would assume that with nginx container running, mapped to port 80, and proxying my localhost:3000, that I would be able to see my very simple (hello world) application. Instead I receive a 502. Do I need to pass something into docker? Is this likely a nginx configuration error? Here is my nginx configuration: server { listen 0.0 .0 .0 :80 ; server_name localhost; location / { proxy_pass http ://localhost:3000; } } I have tried using (https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach?rq=1) this question but it did not seem to help. That is unless I'm doing something completely wrong. (https://stackoverflow.com/questions/tagged/node.js) (show questions tagged 'node.js') node.js (https://stackoverflow.com/questions/tagged/nginx) (show questions tagged 'nginx') nginx (https://stackoverflow.com/questions/tagged/docker) (show questions tagged 'docker') docker (https://stackoverflow.com/q/27810076) (Short permalink to this question) Share (https://stackoverflow.com/posts/27810076/edit) Improve this question Follow Follow this question to receive notifications asked (2015-01-07 01:27:11Z) Jan 7, 2015 at 1:27 (https://stackoverflow.com/users/3236303/adam-beck) (adam-beck's user avatar) (https://stackoverflow.com/users/3236303/adam-beck) adam-beck adam-beck (reputation score) 6,019 (5 gold badges) 5 5 gold badges (22 silver badges) 22 22 silver badges (35 bronze badges) 35 35 bronze badges 4 possible duplicate of (http://stackoverflow.com/questions/27556301/connect-to-local-mysql-server-through-docker) Connect to Local MySQL Server Through Docker? – (https://stackoverflow.com/users/448734/bryan) (12,240 reputation) Bryan Commented (2015-01-07 11:47:28Z, License: CC BY-SA 3.0) Jan 7, 2015 at 11:47 I tried that as well and couldn't seem to get it to work. I know this similar question has been asked many times and even the 502 error I'm getting has been too, but none of those have worked. I will re-check when I am home from work. – (https://stackoverflow.com/users/3236303/adam-beck) (6,019 reputation) adam-beck Commented (2015-01-07 13:37:16Z, License: CC BY-SA 3.0) Jan 7, 2015 at 13:37 DNS ftw, imo. The host has a name ;) – (https://stackoverflow.com/users/2105103/user2105103) (13,165 reputation) user2105103 Commented (2015-01-07 19:27:28Z, License: CC BY-SA 3.0) Jan 7, 2015 at 19:27 docker on linux, version >= 20.04 can use host.docker.internal with a run flag; see (https://stackoverflow.com/a/61424570/2014893) stackoverflow.com/a/61424570/2014893 – (https://stackoverflow.com/users/2014893/robert-k-bell) (10,294 reputation) Robert K. Bell Commented (2020-08-17 06:28:58Z, License: CC BY-SA 4.0) Aug 17, 2020 at 6:28 (Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.) Add a comment | (Expand to show all comments on this post) 7 Answers 7 Sorted by: (https://stackoverflow.com/questions/27810076/how-do-i-access-a-server-on-localhost-with-nginx-docker-container?answertab=scoredesc#tab-top) Reset to default (scoredesc) Highest score (default) (trending) Trending (recent votes count more) (modifieddesc) Date modified (newest first) (createdasc) Date created (oldest first) This answer is useful 86 (This answer is not useful) Save this answer. (Loading when this answer was accepted…) (https://stackoverflow.com/posts/51086203/timeline) Show activity on this post. If you're using docker-for-mac 18.03 or newer it auto creates a special DNS entry host.docker.internal that dynamically binds to the host inet ip. You can then use the dns name to proxy services running on the host machine from inside a container as a stand-in for localhost . i.e. an nginx config file: server { listen 0.0 .0 .0 :80 ; server_name localhost; location / { proxy_pass http ://host.docker.internal:3000; } } (https://stackoverflow.com/a/51086203) (Short permalink to this answer) Share (https://stackoverflow.com/posts/51086203/edit) Improve this answer Follow Follow this answer to receive notifications answered (2018-06-28 15:06:12Z) Jun 28, 2018 at 15:06 (https://stackoverflow.com/users/129190/digitaldreamer) (digitaldreamer's user avatar) (https://stackoverflow.com/users/129190/digitaldreamer) digitaldreamer digitaldreamer (reputation score 55,712) 55.7k (6 gold badges) 6 6 gold badges (35 silver badges) 35 35 silver badges (28 bronze badges) 28 28 bronze badges 3 (number of 'useful comment' votes received) 14 Note: host.docker.internal does not work on linux. – (https://stackoverflow.com/users/6790541/21rw) (1,136 reputation) 21rw Commented (2021-04-11 03:22:13Z, License: CC BY-SA 4.0) Apr 11, 2021 at 3:22 (number of 'useful comment' votes received) 6 Unless you set extra-hosts (https://stackoverflow.com/a/43541732/6790541) stackoverflow.com/a/43541732/6790541 – (https://stackoverflow.com/users/6790541/21rw) (1,136 reputation) 21rw Commented (2021-04-11 05:10:32Z, License: CC BY-SA 4.0) Apr 11, 2021 at 5:10 (number of 'useful comment' votes received) 3 This also worked for me on a Windows 10 host. – (https://stackoverflow.com/users/705296/joe-sadoski) (675 reputation) Joe Sadoski Commented (2021-09-17 15:28:45Z, License: CC BY-SA 4.0) Sep 17, 2021 at 15:28 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful 27 (This answer is not useful) Save this answer. (Loading when this answer was accepted…) (https://stackoverflow.com/posts/27814576/timeline) Show activity on this post. You can get your current IP address as shown (https://stackoverflow.com/questions/845694/how-do-i-find-my-computers-ip-address-using-the-bash-shell) here : ifconfig en0 | grep inet | grep -v inet6 | awk '{print $2}' Then you can use the --add-host flag with docker run : docker run --add-host localnode :$(ifconfig en0 | grep inet | grep -v inet6 | awk '{print \$2}' ) ... In your proxypass use localnode instead of localhost . (https://stackoverflow.com/a/27814576) (Short permalink to this answer) Share (https://stackoverflow.com/posts/27814576/edit) Improve this answer Follow Follow this answer to receive notifications (https://stackoverflow.com/posts/27814576/revisions) (show all edits to this post) edited (2017-05-23 12:00:29Z) May 23, 2017 at 12:00 (https://stackoverflow.com/users/-1/community) (Community's user avatar) (https://stackoverflow.com/users/-1/community) Community (Community Bot — not a real person. Replies to this bot are not monitored.) Bot (reputation score) 1 (1 silver badge) 1 1 silver badge answered (2015-01-07 07:40:06Z) Jan 7, 2015 at 7:40 (https://stackoverflow.com/users/47110/abdullah-jibaly) (Abdullah Jibaly's user avatar) (https://stackoverflow.com/users/47110/abdullah-jibaly) Abdullah Jibaly Abdullah Jibaly (reputation score 54,880) 54.9k (45 gold badges) 45 45 gold badges (128 silver badges) 128 128 silver badges (201 bronze badges) 201 201 bronze badges 3 (number of 'useful comment' votes received) 1 This was along the right lines but did not work exactly for me. For one I am working off my laptop so my method of extracting the ip was obviously different. I tried using the same method changing en0 but kept getting results with addr:192.xxx.x.xx so I eventually just hard-coded that in. What utility would I use to strip the beginning addr: as providing that will not work with docker. Thank you though. I'm writing this comment for others who come across this problem. – (https://stackoverflow.com/users/3236303/adam-beck) (6,019 reputation) adam-beck Commented (2015-01-08 02:34:16Z, License: CC BY-SA 3.0) Jan 8, 2015 at 2:34 (number of 'useful comment' votes received) 1 Nevermind, I used sed in order to strip the beginning addr: . As you can tell I'm not a sysops guy :) – (https://stackoverflow.com/users/3236303/adam-beck) (6,019 reputation) adam-beck Commented (2015-01-08 13:35:20Z, License: CC BY-SA 3.0) Jan 8, 2015 at 13:35 On my Ubuntu, it's eth0 instead of en0. – (https://stackoverflow.com/users/1323283/tedyyu) (607 reputation) tedyyu Commented (2023-12-10 10:49:59Z, License: CC BY-SA 4.0) Dec 10, 2023 at 10:49 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful 5 (This answer is not useful) Save this answer. (Loading when this answer was accepted…) (https://stackoverflow.com/posts/27812811/timeline) Show activity on this post. Yes. Docker needs to know about your host machine. You can set an alias to that with the --add-host switch. On a *nix box to create an alias to a name "localbox", this would be: docker run my_repo/my_image --add-host=localbox :` On boot2docker it would be: docker run my_repo/my_image --add-host=localbox :192.168 .59 .3 ` where you should replace "192.168.59.3" with whatever boot2docker ip returns. Then, you should access your host machine always through the alias localbox, so just change your nginx config to: location / { proxy_pass http ://localbox:3000; } (https://stackoverflow.com/a/27812811) (Short permalink to this answer) Share (https://stackoverflow.com/posts/27812811/edit) Improve this answer Follow Follow this answer to receive notifications answered (2015-01-07 05:14:07Z) Jan 7, 2015 at 5:14 (https://stackoverflow.com/users/392975/eli) (Eli's user avatar) (https://stackoverflow.com/users/392975/eli) Eli Eli (reputation score 39,079) 39.1k (40 gold badges) 40 40 gold badges (155 silver badges) 155 155 silver badges (213 bronze badges) 213 213 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful 3 (This answer is not useful) Save this answer. (Loading when this answer was accepted…) (https://stackoverflow.com/posts/63895301/timeline) Show activity on this post. On linux, this works for me: In the docker-compose.yml, mount an entrypoint script into the nginx container: nginx: image: nginx:1.19.2 # ... volumes: - ./nginx-entrypoint.sh:/docker-entrypoint.d/nginx-entrypoint.sh:ro The contents of the entrypoint map a local address to the host local address. apt update apt install iproute2 -y echo "`ip route | awk '/default/ { print $3 }'`\tdocker.host.internal" >> /etc/hosts Then, instead of using localhost inside the container, you can use docker.host.internal . (https://stackoverflow.com/a/63895301) (Short permalink to this answer) Share (https://stackoverflow.com/posts/63895301/edit) Improve this answer Follow Follow this answer to receive notifications answered (2020-09-15 04:50:54Z) Sep 15, 2020 at 4:50 (https://stackoverflow.com/users/802138/matthias) (Matthias's user avatar) (https://stackoverflow.com/users/802138/matthias) Matthias Matthias (reputation score 15,572) 15.6k (9 gold badges) 9 9 gold badges (49 silver badges) 49 49 silver badges (65 bronze badges) 65 65 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful 0 (This answer is not useful) Save this answer. (Loading when this answer was accepted…) (https://stackoverflow.com/posts/78645746/timeline) Show activity on this post. You can get access a server on localhost by docker desktop host networking. Host networking is also supported on Docker Desktop version 4.29 and later for Mac, Windows, and Linux as a beta feature . To enable this feature, navigate to the Features in development tab in Settings , and then select Enable host networking . The reference is (https://docs.docker.com/network/drivers/host/#docker-desktop) here (https://stackoverflow.com/a/78645746) (Short permalink to this answer) Share (https://stackoverflow.com/posts/78645746/edit) Improve this answer Follow Follow this answer to receive notifications answered (2024-06-20 06:08:00Z) Jun 20, 2024 at 6:08 (https://stackoverflow.com/users/8774520/iku) (iku's user avatar) (https://stackoverflow.com/users/8774520/iku) iku iku (reputation score) 1,144 (13 silver badges) 13 13 silver badges (16 bronze badges) 16 16 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful -2 (This answer is not useful) Save this answer. (Loading when this answer was accepted…) (https://stackoverflow.com/posts/74094859/timeline) Show activity on this post. I had the same problem. Fixed it by using the local ip address of the docker host, instead of localhost. So if the local ip address of your docker host in your LAN is 192.168.2.2: location / { proxy_pass http ://192.168.2.2:3000; } Of course this solution only works well if you have assigned a static ip to your docker host. (https://stackoverflow.com/a/74094859) (Short permalink to this answer) Share (https://stackoverflow.com/posts/74094859/edit) Improve this answer Follow Follow this answer to receive notifications answered (2022-10-17 09:02:56Z) Oct 17, 2022 at 9:02 (https://stackoverflow.com/users/5630207/jakub) (Jakub's user avatar) (https://stackoverflow.com/users/5630207/jakub) Jakub Jakub (reputation score) 123 (1 silver badge) 1 1 silver badge (11 bronze badges) 11 11 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful -3 (This answer is not useful) Save this answer. (Loading when this answer was accepted…) (https://stackoverflow.com/posts/51806819/timeline) Show activity on this post. And finally, if you are using Nginx as a reverse proxy for multiple services, you can spin all of that with docker-compose. Make sure to expose ports “80:80” only on the Nginx service. Other services you can expose only the service port without mapping to the underlying network like so: web : ..... expose : - 8080 nginx : ..... port : - “80 :80 ” and then use Nginx configuration proxy_pass (http://service-name:port) http://service-name:port You don’t need the upstream app part at all (https://stackoverflow.com/a/51806819) (Short permalink to this answer) Share (https://stackoverflow.com/posts/51806819/edit) Improve this answer Follow Follow this answer to receive notifications (https://stackoverflow.com/posts/51806819/revisions) (show all edits to this post) edited (2019-01-10 09:58:26Z) Jan 10, 2019 at 9:58 (https://stackoverflow.com/users/1233251/e-net4) (E_net4's user avatar) (https://stackoverflow.com/users/1233251/e-net4) E_net4 (reputation score 30,161) 30.2k (13 gold badges) 13 13 gold badges (114 silver badges) 114 114 silver badges (151 bronze badges) 151 151 bronze badges answered (2018-08-12 07:47:47Z) Aug 12, 2018 at 7:47 (https://stackoverflow.com/users/9706751/george-mogilevsky) (George Mogilevsky's user avatar) (https://stackoverflow.com/users/9706751/george-mogilevsky) George Mogilevsky George Mogilevsky (reputation score) 637 (5 silver badges) 5 5 silver badges (8 bronze badges) 8 8 bronze badges 3 It's not clear what you mean here by "upstream app part" that we won't need. Also this ends up being not very portable if http://service-name is your external domain instead of localhost. That was the first alternative I found to localhost, but I don't like it because I can't be sure that my nginx redirects aren't in fact going back out to the internet just to come in on a different port. – (https://stackoverflow.com/users/1279516/jcairney) (3,254 reputation) jcairney Commented (2019-10-08 00:08:25Z, License: CC BY-SA 4.0) Oct 8, 2019 at 0:08 (this comment was edited 2 times) Please read the docs, it’s a technical term that you should be familiar with. (http://nginx.org/en/docs/http/ngx_http_upstream_module.html) nginx.org/en/docs/http/ngx_http_upstream_module.html – (https://stackoverflow.com/users/9706751/george-mogilevsky) (637 reputation) George Mogilevsky Commented (2019-10-08 00:14:31Z, License: CC BY-SA 4.0) Oct 8, 2019 at 0:14 It is a technical term I was familiar with, but I wouldn't expect everyone to be, nor was I even sure that's what you were referring to. Also, I do not know why you mentioned it, since nobody else mentioned 'upstream' above. I would not consider the 'upstream' module a beginner feature, so it's not very sporting to say "you should know this". This is stackoverflow, where people come because they can't know everything. – (https://stackoverflow.com/users/1279516/jcairney) (3,254 reputation) jcairney Commented (2019-10-31 19:04:27Z, License: CC BY-SA 4.0) Oct 31, 2019 at 19:04 (this comment was edited 2 times) (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) Your Answer Draft saved Draft discarded Sign up or (https://stackoverflow.com/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f27810076%2fhow-do-i-access-a-server-on-localhost-with-nginx-docker-container%23new-answer) log in Sign up using Google Sign up using Email and Password Submit Post as a guest Name Email Required, but never shown Post as a guest Name () () Email Required, but never shown () () Post Your Answer Discard By clicking “Post Your Answer”, you agree to our (https://stackoverflow.com/legal/terms-of-service/public) terms of service and acknowledge you have read our (https://stackoverflow.com/legal/privacy-policy) privacy policy . Start asking to get answers Find the answer to your question by asking. (https://stackoverflow.com/questions/ask) Ask question Explore related questions (https://stackoverflow.com/questions/tagged/node.js) (show questions tagged 'node.js') node.js (https://stackoverflow.com/questions/tagged/nginx) (show questions tagged 'nginx') nginx (https://stackoverflow.com/questions/tagged/docker) (show questions tagged 'docker') docker See similar questions with these tags. The Overflow Blog (https://stackoverflow.blog/2025/04/23/community-products-roadmap-update-april-2025/?cb=1) Community Products roadmap update, April 2025 (https://stackoverflow.blog/2025/04/25/grab-bag-on-the-floor-at-humanx/?cb=1) Grab bag! On the floor at HumanX Featured on Meta (Meta Stack Exchange) (https://meta.stackexchange.com/questions/408408/results-of-the-march-2025-community-asks-sprint?cb=1) Results of the March 2025 Community Asks Sprint (Meta Stack Exchange) (https://meta.stackexchange.com/questions/408476/upcoming-initiatives-on-stack-overflow-and-across-the-stack-exchange-network-a?cb=1) (Upcoming initiatives on Stack Overflow and across the Stack Exchange network - April 2025) Upcoming initiatives on Stack Overflow and across the Stack Exchange network... (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/421831/policy-generative-ai-e-g-chatgpt-is-banned?cb=1) Policy: Generative AI (e.g., ChatGPT) is banned (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/433641/what-we-learned-about-follow-up-questions-and-whats-next?cb=1) What We Learned About Follow-up Questions and What's Next Linked (https://stackoverflow.com/q/31324981?lq=1) (Question score (upvotes - downvotes)) 799 (https://stackoverflow.com/questions/31324981/how-to-access-host-port-from-docker-container?noredirect=1&lq=1) How to access host port from docker container (https://stackoverflow.com/q/40746453?lq=1) (Question score (upvotes - downvotes)) 105 (https://stackoverflow.com/questions/40746453/how-to-connect-to-docker-host-from-container-on-windows-10-docker-for-windows?noredirect=1&lq=1) How to connect to docker host from container on Windows 10 (Docker for Windows) (https://stackoverflow.com/q/845694?lq=1) (Question score (upvotes - downvotes)) 26 (https://stackoverflow.com/questions/845694/how-do-i-find-my-computers-ip-address-using-the-bash-shell?noredirect=1&lq=1) How do I find my computer's IP address using the bash shell? (https://stackoverflow.com/q/27556301?lq=1) (Question score (upvotes - downvotes)) 22 (https://stackoverflow.com/questions/27556301/how-to-connect-to-local-mysql-server-through-docker?noredirect=1&lq=1) How to connect to local MySQL server through Docker? (https://stackoverflow.com/q/35940800?lq=1) (Question score (upvotes - downvotes)) 9 (https://stackoverflow.com/questions/35940800/cannot-ping-docker-container-ip-from-host-machine?noredirect=1&lq=1) Cannot ping docker container IP from host machine (https://stackoverflow.com/q/28619356?lq=1) (Question score (upvotes - downvotes)) 4 (https://stackoverflow.com/questions/28619356/nginx-with-dockerized-nodejs?noredirect=1&lq=1) Nginx with dockerized NodeJS (https://stackoverflow.com/q/28048910?lq=1) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/28048910/connecting-from-a-docker-container-to-the-host?noredirect=1&lq=1) Connecting from a docker container to the host? Related (https://stackoverflow.com/q/24319662?rq=3) (Question score (upvotes - downvotes)) 3533 (https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach?rq=3) From inside of a Docker container, how do I connect to the localhost of the machine? (https://stackoverflow.com/q/32045816?rq=3) (Question score (upvotes - downvotes)) 5 (https://stackoverflow.com/questions/32045816/how-to-access-web-page-served-by-nginx-web-server-running-in-docker-container?rq=3) How to access web page served by nginx web server running in docker container (https://stackoverflow.com/q/44286754?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/44286754/how-do-i-connect-to-the-localhost-of-a-docker-container-from-inside-the-contain?rq=3) How do I connect to the localhost of a docker container (from inside the container) (https://stackoverflow.com/q/46484174?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/46484174/nginx-docker-as-nodejs-proxy-in-local?rq=3) Nginx docker as nodejs proxy in local (https://stackoverflow.com/q/48873382?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/48873382/docker-has-is-up-however-cant-reach-localhost-at-port-8000?rq=3) Docker has is up however can't reach localhost at port 8000 (https://stackoverflow.com/q/50409214?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/50409214/how-to-access-service-in-localhost-exposed-on-a-given-port-from-a-nginx-containe?rq=3) How to access service in localhost exposed on a given port from a nginx container (https://stackoverflow.com/q/51329083?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/51329083/cant-access-through-localhost-to-my-web-server-on-docker?rq=3) Can't access through localhost to my web server on docker (https://stackoverflow.com/q/58681224?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/58681224/nginx-in-docker-fails-to-talk-to-localhost?rq=3) nginx in docker fails to talk to localhost (https://stackoverflow.com/q/65246551?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/65246551/connecting-to-a-docker-localhost-port-from-my-local-machine?rq=3) Connecting to a docker localhost port from my local machine (https://stackoverflow.com/q/72282618?rq=3) (Question score (upvotes - downvotes)) 4 (https://stackoverflow.com/questions/72282618/cant-redirect-traffic-to-localhost-with-nginx-and-docker?rq=3) Can't redirect traffic to localhost with nginx and docker (https://stackexchange.com/questions?tab=hot) Hot Network Questions (Mathematica Stack Exchange) (https://mathematica.stackexchange.com/questions/312382/speeding-up-v-reversev-or-listconvolvev-v) Speeding up v.Reverse[v] or ListConvolve[v,v] (Personal Finance & Money Stack Exchange) (https://money.stackexchange.com/questions/165909/im-owed-money-from-a-non-profit-for-services-rendered-but-they-are-unresponsiv) I'm owed money from a non-profit for services rendered, but they are unresponsive (Skeptics Stack Exchange) (https://skeptics.stackexchange.com/questions/57865/did-pope-francis-actually-die-with-only-100-cash-and-no-other-assets) Did Pope Francis actually die with only $100 cash and no other assets? (Academia Stack Exchange) (https://academia.stackexchange.com/questions/218120/accepting-a-postdoc-over-a-tt-position) Accepting a Postdoc over a TT Position (Mi Yodeya) (https://judaism.stackexchange.com/questions/149103/how-does-kabbalah-explain-left-handed-ness) How does Kabbalah explain left handed-ness? (MathOverflow) (https://mathoverflow.net/questions/491726/collapsing-constant-positive-scalar-curvature-metrics-on-a-closed-manifold-with) Collapsing constant positive scalar curvature metrics on a closed manifold with non-vanishing Euler characteristic (Travel Stack Exchange) (https://travel.stackexchange.com/questions/195430/im-staying-in-the-us-for-a-night-at-the-beginning-and-end-of-my-trip-did-i-nee) I'm staying in the US for a night at the beginning and end of my trip. Did I need to select the transit option on the ESTA? (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/744769/convert-bipolar-signal-to-unipolar-without-adding-a-capacitor) Convert bipolar signal to unipolar without adding a capacitor (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/744816/why-full-wave-bridge-circuit-connect-ground) Why full-wave bridge circuit connect ground (Home Improvement Stack Exchange) (https://diy.stackexchange.com/questions/317286/should-i-use-quick-or-delayed-fuses-in-my-panel) Should I use quick or delayed fuses in my panel? (Worldbuilding Stack Exchange) (https://worldbuilding.stackexchange.com/questions/266104/would-a-ship-using-a-warp-drive-for-propulsion-experience-g-forces-while-acceler) Would a ship using a warp drive for propulsion experience G-Forces while accelerating? (Super User) (https://superuser.com/questions/1894269/where-am-i-supposed-to-plug-in-this-pcie-ssd) Where am I supposed to plug in this PCIe SSD? (Role-playing Games Stack Exchange) (https://rpg.stackexchange.com/questions/215362/how-to-deal-with-scheduling-issues-in-a-small-group-of-players) How to deal with scheduling issues in a small group of players? (Stack Overflow) (https://stackoverflow.com/questions/79593051/how-can-i-negate-a-logical-value-in-a-base-r-pipeline) How can I negate a logical value in a base R pipeline? (Travel Stack Exchange) (https://travel.stackexchange.com/questions/195400/at-what-time-does-early-check-in-become-a-full-night-s-stay-hotel-check-in-pol) At what time does early check-in become a full night’s stay? (Hotel check-in policy ambiguity) (MathOverflow) (https://mathoverflow.net/questions/491724/matrices-with-many-traceless-powers) Matrices with many traceless powers (Blender Stack Exchange) (https://blender.stackexchange.com/questions/333908/create-a-3d-helical-spiral-based-on-phi-with-constant-radius-using-geometry-node) Create a 3D helical spiral based on PHI with constant radius using geometry nodes (German Language Stack Exchange) (https://german.stackexchange.com/questions/79143/undeclined-modifiers-used-with-adjectival-nouns) Undeclined modifiers used with adjectival nouns (Movies & TV Stack Exchange) (https://movies.stackexchange.com/questions/125184/why-do-the-infected-not-attack-each-other) Why do the infected not attack each other? (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/5060048/is-it-known-whether-free-complete-heyting-algebras-exist) Is it known whether Free Complete Heyting Algebras Exist? (The Great Outdoors Stack Exchange) (https://outdoors.stackexchange.com/questions/30167/multiday-hike-in-uk-with-children) Multiday hike in UK with children (Bicycles Stack Exchange) (https://bicycles.stackexchange.com/questions/96669/how-to-remove-stripped-disc-brake-rotor-bolts) How to remove stripped disc brake rotor bolts (Chemistry Stack Exchange) (https://chemistry.stackexchange.com/questions/188508/difference-in-magnetic-moment-of-criii-and-coii-ions-despite-having-the-sam) Difference in magnetic moment of Cr(III) and Co(II) ions, despite having the same number of unpaired electrons (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91537/why-do-countries-not-ban-harmful-products-such-as-tobacco-and-sugar) Why do countries not ban harmful products such as tobacco and sugar? (https://stackoverflow.com/feeds/question/27810076) (Feed of this question and its answers) Question feed Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. (https://stackoverflow.com/feeds/question/27810076) () lang-js (https://stackoverflow.com/) (https://stackoverflow.com/) Stack Overflow (https://stackoverflow.com/questions) Questions (https://stackoverflow.com/help) Help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) Chat (https://stackoverflow.co/) Products (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=teams) Teams (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=advertising) Advertising (https://stackoverflow.co/advertising/employer-branding/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=talent) Talent (https://stackoverflow.co/) Company (https://stackoverflow.co/) About (https://stackoverflow.co/company/press/) Press (https://stackoverflow.co/company/work-here/) Work Here (https://stackoverflow.com/legal) Legal (https://stackoverflow.com/legal/privacy-policy) Privacy Policy (https://stackoverflow.com/legal/terms-of-service/public) Terms of Service (https://stackoverflow.com/contact) Contact Us Your Privacy Choices (https://stackoverflow.com/legal/cookie-policy) Cookie Policy (https://stackexchange.com/) Stack Exchange Network (https://stackexchange.com/sites#technology) Technology (https://stackexchange.com/sites#culturerecreation) Culture & recreation (https://stackexchange.com/sites#lifearts) Life & arts (https://stackexchange.com/sites#science) Science (https://stackexchange.com/sites#professional) Professional (https://stackexchange.com/sites#business) Business (https://api.stackexchange.com/) API (https://data.stackexchange.com/) Data (https://stackoverflow.blog/?blb=1) Blog (https://www.facebook.com/officialstackoverflow/) Facebook (https://twitter.com/stackoverflow) Twitter (https://linkedin.com/company/stack-overflow) LinkedIn (https://www.instagram.com/thestackoverflow) Instagram Site design / logo © 2025 Stack Exchange Inc; user contributions licensed under (https://stackoverflow.com/help/licensing) CC BY-SA . rev 2025.4.24.25623 By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our (https://stackoverflow.com/legal/cookie-policy) Cookie Policy . Accept all cookies Necessary cookies only Customize settings