Welcome! Log In Create A New Profile

Advanced

Move a service in a URI subfolder?

Posted by lalebarde 
Move a service in a URI subfolder?
January 25, 2022 07:39AM
Hi,
I have a single service deployed, say service1, reachable under my domain URI: http://mydomain.com
I would like to deploy other services on the same machine: service2, service3, etc.
I want to organize access with the use of one URI subfolder per service like this: http://mydomain.com/service1, http://mydomain.com/service2, etc.
I cannot modify the services themselves.
Here is the current nginx config file for service1 which makes use of gunicorn and which is a Flask application, /etc/nginx/sites-enabled/service1. I have simplified it (there is no root primitive):

____server {
________listen 80;
________location / {
____________include proxy_params;
____________proxy_pass http://unix:/var/run/service1flask.sock;
________}
____}

At least for service1, I need to change the 'location' primitive to:

________location / service1{

But it does not work.

Is it possible to deal with this use-case please?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 40
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready