Unable to Access Nginx on macOS Sequoia 15.1 from Local Network

I installed Nginx using brew install nginx and PHP using brew install php, but I'm encountering an issue where I get the error "cURL Error: Failed to connect to 192.168.80.159 port 4000 after 0 ms: Could not connect to server". I have confirmed that the IP address 192.168.80.159 and port 4000 are reachable via ping. It seems like Nginx is not properly configured for access within the local network. How can I add Nginx to the local network? Thank you!


[Re-Titled By Moderator]


MacBook Pro 13″, macOS 11.7

Posted on Dec 19, 2024 6:08 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 19, 2024 6:29 PM

Just to be sure...you installed Nginx on the computer with the IP address 192.168.80.159, and are trying to reach it from a different computer on the same subnet?


Assuming so, was Nginx started on that computer? Is it listening on port 4000? Is there any content for it to serve when contacted? What content is it supposed to be serving? Does that computer (presumably a Mac) have the application firewall turned on that would prevent Nginx from responding to incoming requests? Other security software? Have you tried using a browser instead of cURL to see what a browser reports?


Have you been through Nginx's user documentation? Have you configured it properly (you must have done something since the default port Nginx uses when installed with Homebrew is 8080 to avoid having to run it using sudo)...


You are probably right that it is not properly configured - but since no one knows how you configured it, there's not much advice to give.

4 replies
Question marked as Top-ranking reply

Dec 19, 2024 6:29 PM in response to David-labs

Just to be sure...you installed Nginx on the computer with the IP address 192.168.80.159, and are trying to reach it from a different computer on the same subnet?


Assuming so, was Nginx started on that computer? Is it listening on port 4000? Is there any content for it to serve when contacted? What content is it supposed to be serving? Does that computer (presumably a Mac) have the application firewall turned on that would prevent Nginx from responding to incoming requests? Other security software? Have you tried using a browser instead of cURL to see what a browser reports?


Have you been through Nginx's user documentation? Have you configured it properly (you must have done something since the default port Nginx uses when installed with Homebrew is 8080 to avoid having to run it using sudo)...


You are probably right that it is not properly configured - but since no one knows how you configured it, there's not much advice to give.

Dec 19, 2024 6:41 PM in response to g_wolfman

I have Nginx installed on my local machine with the IP address 192.168.80.220, and I'm trying to access a service on another host at 192.168.80.159 through my local Nginx. On macOS Sequoia 15.1, services need to be authorized to access other devices on the local network. However, the Nginx installed via brew install nginx does not appear in the local network access list, so I'm unable to authorize it. This results in failed network requests. How can I add Nginx to the list to grant it the necessary permissions? Thank you!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to Access Nginx on macOS Sequoia 15.1 from Local Network

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.