Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hello,
I’m currently working on a somewhat convoluted setup for a Tomcat-based web application, and I’m having trouble getting Nginx to work as a reverse proxy. My application has multiple components with specific routing requirements that I’m struggling to configure correctly so I decided to ask the community here.
To summarise my setup
I’ve tried configuring Nginx with the following settings, but I’m still having issues with the routing:
http {
upstream tomcat_server {
server domain1.com:8080;
}
server {
listen 80;
server_name domain1.com;
location /static/ {
root /path/to/static/files;
}
location / {
proxy_pass http://tomcat_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /api/ {
proxy_pass http://tomcat_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
listen 80;
server_name domain2.com;
location /ws/ {
proxy_pass http://tomcat_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}
I’ve removed my actual domains from the configuration file.
I’m still experiencing issues with the WebSocket connections and some static resources are not being served correctly. I’m not sure if I’m missing any important Nginx directives or if the configuration itself is incorrect.
If you need more information about my current setup, I’ll be happy to provide it.
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e
markatango
gouskova