Linux application URL

Creation date: 3/17/2022 5:26 PM    Updated: 10/19/2023 8:03 AM    linux
Question:

Running the helpdesk app on Linux makes it listen to "localhost:5000" only, ignoring other URLs. How can I make it listen to more names and IP addresses?


Answer:

You can set the ASPNETCORE_URLS environment variable to a desired URL(s) like this: "http://*:5000;http://localhost:5001;https://hostname:5002"

For example, in Bash:

export ASPNETCORE_URLS="http://localhost:5001;https://localhost:5002"

Alternatively by adding this to the appsettings.json file:

"Urls": "http://*:5000"

But the long term recommended way would be to set up a nginx reverse proxy in front of the app.
Solving problems with on-premises version of Jitbit Helpdesk ticketing system