This tutorial are suitable for you if you want to reverse multi endpoint with one domain different port.
- You can access on
localhost:8443
to accesslocalhost:9200
- You can access on
localhost:8442
to accesslocalhost:5601
nano /etc/nginx/sites-enabled/default
server {
listen 8443;
server_name _;
location / {
proxy_pass http://localhost:9200;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
listen 8442;
server_name _;
location / {
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
service nginx reload