NEWS COMMUNITY STORE TUTORIALS LINUX SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS LINUX TOGGLE FULLSCREEN VOLLBILD AN/AUS image/svg+xml image/svg+xml image/svg+xml Nginx - Http Routing
Use one server for routing multiple services
image/svg+xml image/svg+xml Use one server for routing multiple services image/svg+xml
quick-tip img:not(.icon) quick-tip img:not(.icon) quick-tip img[data-info] APP | VERSION
Linux/Ubuntu 22


RELATED TAGS
linux, routing, multiple services, server


QUESTIONS
How can I run multiple servers on the same port?
What do I need to combine multiple services?
How do I keep a process running when ssh closes?


LINKS
Nginx website
There are often situations, where you have multiple services that you want to run on one server. To avoid manual reconfiguration of port management or simply hiding the source Nginx can be used to take requests and rewrite them. The following configuration can be used to send multiple different DNS to different ports as root.

    Login
Login on the remote server via ssh you@local:$ssh root@{server-adress}


    Install Nginx
If not already installed, install Nginx root@server:$sudo apt install nginx


    Test Nginx
root@server:$nginx -v Nginx should output the installed version.


    Create File
To add a new routing, add a file in /etc/nginx/sites-available with the name my-service

Change dir: root@server:$cd /etc/nginx/sites-available Open in Nano: root@server:$nano my-service Write routing: server { listen 443 ssl; server_name my-service.com; location / { proxy_pass http://127.0.0.1:8080; } } Save file and close Nano.


    Create Symlink To Enabled Sites
To activate the routing, create a symlink of the file from sites-available in nginx's sites-enabled directory root@server:$ln -s /etc/nginx/sites-available/my-service /etc/nginx/sites-enabled


    Run Nginx
root@server:$systemctl start nginx


    Test Nginx Status
root@server:$systemctl status nginx

For any additional routing just create another file.

APP | VERSION
Linux/Ubuntu 22


RELATED TAGS
linux, routing, multiple services, server


QUESTIONS
How can I run multiple servers on the same port?
What do I need to combine multiple services?
How do I keep a process running when ssh closes?


LINKS
Nginx website
LINUX






All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...