-
-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
47.5 RC. Issue #165. Option for Mongoose web server to listen on all …
…IP addresses available. In settings.json set: "listen_on": ["*", 54007] - this will make web server to listen on 127.0.0.1 and on 192.168.0.x and also on a public internet ip address. During testing I only confirmed that it listened on local ip addresses (127.xxx and 192.xxx), I couldn't make it work for the internet ip address - not sure if this is an issue in Mongoose web server, or or my router's port forwarding wasn't configured properly. Note also that when listen_on is set to "*" then the SERVER_NAME environment variable will still be set to 127.0.0.1 - this may cause issues in PHP scripts that depend on that env variable. To fix it add this code at the top of all your PHP scripts: <?php $_SERVER["SERVER_NAME"] = $_SERVER["HTTP_HOST"]; ?> This will set SERVER_NAME to an ip address that the web server is being accessed from. For example when accessing from 127.0.0.1 it will be set to that. When accessing from 192.168.0.2 then it will be 192.xxx in that case.
- Loading branch information
Showing
2 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters