I am trying to use nginx as a reverse proxy for my Odoo deployment. Indeed I have two instances accessible respectively on port 8069 and 8090. Is it possible to configure nginx for these two instances given that I have only IP address (I don't want to use a domain name)?
I have tried something like this:
server{
listen 80 default_server;
server_name my_ip_address/instance1;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8090;
}
}
server{
listen 80;
server_name my_ip_address/instance2;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8099;
}
}
And I have tried also
server{
listen 80 default_server;
server_name my_ip_address;
location /instance1 {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8090;
}
}
server{
listen 80;
server_name my_ip_address;
location /instance2 {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8099;
}
}
But when I try to access my_ip_address/instance1 or my_ip_address/instance2 neither is working