How do I run more than one core application on Nginx server

April 29, 2018 683 views
Nginx Ubuntu 16.04

I want to run two or more core applications on the same server. But the ip and port they use are

2 Answers
mrkemaltas April 30, 2018
Accepted Answer

I found a solition , configration;

public class Program
        public static void Main(string[] args)

        public static IWebHost BuildWebHost(string[] args) =>
                 .UseUrls("http://localhost:5001/")    // We are here to work at a different port

nginx configration

server_name ;
 location / {

                 proxy_pass http://localhost:5001; // Listening 5001 Port
                 proxy_http_version 1.1;
                 proxy_set_header Upgrade $http_upgrade;
                 proxy_set_header Connection keep-alive;
                 proxy_set_header Host $http_host;
                 proxy_cache_bypass $http_upgrade;

                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                # try_files $uri $uri/ =404;

You can wrap them with Docker and configure them to listen different ports.

Read more about that

Have another answer? Share your knowledge.