Sunday, June 28, 2026

Infrastructure running: nginx, apache, php, python/django, uvicorn, tomcat.

This infrastructure operates as a polyglot microservices or multi-tenant environment where Nginx acts as the central traffic director (reverse proxy and load balancer). It intercepts all incoming requests and intelligently routes them to the correct backend processor based on the request URL or domain. [1, 2, 3, 4, 5]
Here is how the infrastructure delegates traffic behind Nginx:
1. PHP via Apache
  • Routing: Nginx forwards requests intended for your PHP applications to Apache using proxy_pass.
  • Processing: Apache uses its mod_php module or routes via FastCGI to PHP-FPM to execute the scripts. [1, 2, 3, 4, 5]
2. Python/Django via Uvicorn
  • Routing: Requests aimed at your Django application (especially asynchronous/Websocket parts) are forwarded by Nginx directly to Uvicorn (an ASGI server).
  • Processing: Uvicorn translates the HTTP requests and runs the Python logic. [1, 2, 3, 4]
3. Java via Tomcat
  • Routing: Requests meant for Java are passed by Nginx to the specific port that Tomcat is listening on (default 8080).
  • Processing: Apache Tomcat serves the Java Servlets or JSP pages, often relying on a framework like Spring Boot. [1, 2, 3, 4, 5]

Key Infrastructure Components
  • Reverse Proxy / Load Balancer (Nginx): Listens on Ports 80 and 443. It handles SSL termination, serves static files directly (images, CSS), and drops bad traffic. [1, 2, 3, 4]
  • Application Servers: These are the translators (e.g., Uvicorn for Python, Tomcat for Java). They run in the background on specific, non-public local ports. [, 2, 3]
  • Database Layer: All of these varying technologies typically share the same backend database systems (like PostgreSQL or MySQL), which sit securely on a private network or separate virtual machine. [1]  

  


 

 

No comments:

Blog Archive

Followers