Free tools Windows power users keep installed
One-click scans. No signup required.
Run each Flask application as its own production WSGI service, then put one nginx or Apache reverse proxy in front of them. Give every app a separate project directory, virtual environment, configuration, logs, restart policy and Gunicorn process. Route requests by hostname, such as api.example.com, or by URL prefix, such as example.com/api. Use Werkzeug DispatcherMiddleware only when the applications can safely share one Python interpreter, dependency set and failure domain.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Choose the architecture before writing configuration
There are three practical ways to place several Flask applications on one machine. The right choice depends on how independently the applications must be deployed, how much dependency isolation you need and whether a failure in one app may affect the others.
As an Amazon Associate I earn from qualifying purchases.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Architecture | Request routing | Isolation and deployment | Best fit |
|---|---|---|---|
| Separate Gunicorn services behind nginx or Apache | Reverse proxy routes hostnames or paths to private ports or Unix sockets. | Each app has its own environment, workers, logs, restart policy and release cycle. | Most production installations and applications with different dependencies or scaling needs. |
One WSGI process with DispatcherMiddleware |
Werkzeug dispatches requests by URL prefix inside one WSGI application. | Applications share an interpreter, process lifecycle, memory space and dependency environment. | Small, deliberately coupled applications that can use compatible packages and be released together. |
| Apache with mod_wsgi | Apache maps virtual hosts or URL locations to WSGI callables. | Daemon process groups can isolate applications; compatible apps may share an application group. | Teams already standardised on Apache and mod_wsgi or needing Apache-managed WSGI processes. |
For independent applications, separate services are the safest default. Flask is a WSGI application, and its production guidance says not to use the development server for deployment. A reverse proxy handles public HTTP and TLS while a dedicated WSGI server runs the Python code. Keeping those roles separate makes failures, upgrades and access controls easier to reason about.
Plan names, ports and ownership
Write down the public address, internal endpoint and owner for every application before creating services. A simple inventory prevents two apps from claiming the same socket or accidentally receiving each other’s traffic.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
- Public hostname or path: for example,
shop.example.com,admin.example.comorexample.com/reports. - Project directory: use a distinct path such as
/srv/flask/shopand/srv/flask/admin. - Virtual environment: keep one environment per application unless you have deliberately chosen shared dispatching.
- WSGI entry point: identify the importable object, such as
app:app, or an application factory call such asapp:create_app(). - Private listener: assign a unique localhost port or Unix socket to each Gunicorn service.
- Configuration and secrets: define separate environment variables, credentials, database URLs and signing keys.
- Static and upload paths: ensure one application cannot write into another application’s directory.
Do not expose the internal Gunicorn listener publicly when nginx or Apache is in front. Binding to localhost or a protected Unix socket keeps clients from bypassing proxy rules, TLS termination, request limits and access logging.
Build an isolated project for each application
Create directories and virtual environments
Use a service account or another least-privilege owner rather than running application workers as root. The exact account and directory names are yours to choose; the important property is that each app has a predictable, separate boundary.
sudo install -d -o flask-shop -g flask-shop /srv/flask/shop
sudo install -d -o flask-admin -g flask-admin /srv/flask/admin
sudo -u flask-shop python3 -m venv /srv/flask/shop/.venv
sudo -u flask-admin python3 -m venv /srv/flask/admin/.venv
Install each application’s pinned dependencies into its own environment and verify that its WSGI object imports without the development server. A factory-based application should expose a callable that Gunicorn can invoke; a module-level application can expose the object directly.
/srv/flask/shop/.venv/bin/pip install -r /srv/flask/shop/requirements.txt
/srv/flask/admin/.venv/bin/pip install -r /srv/flask/admin/requirements.txt
/srv/flask/shop/.venv/bin/python -c 'from app import app; print(app.name)'
/srv/flask/admin/.venv/bin/python -c 'from app import create_app; print(create_app().name)'
Those import checks catch missing packages, incorrect working directories and configuration errors before a proxy is involved. Keep production settings outside source control where appropriate, and make each service load only its own variables.
Use a production WSGI entry point
Gunicorn’s required argument tells it how to load the Flask application. A module-level object uses the form module:app; an application factory uses a call expression such as module:create_app(). Run the command from the project directory or provide an explicit Python path so imports resolve consistently.
cd /srv/flask/shop
/srv/flask/shop/.venv/bin/gunicorn --bind unix:/run/flask-shop.sock app:app
cd /srv/flask/admin
/srv/flask/admin/.venv/bin/gunicorn --bind unix:/run/flask-admin.sock app:create_app()
These commands illustrate distinct sockets and environments. Worker counts, timeouts and request limits must be sized from measured memory, latency and workload; there is no universal number published by Flask’s documentation. Start conservatively, observe each application’s behavior and change one variable at a time.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Define one service per app
A service manager gives every application an independent restart, startup order, environment and log stream. With systemd, create a unit for each Gunicorn process. The following units are examples; adjust usernames, paths and the WSGI import to your installation.
Example shop service
[Unit]
Description=Shop Flask application
After=network.target
[Service]
User=flask-shop
Group=flask-shop
WorkingDirectory=/srv/flask/shop
EnvironmentFile=/etc/flask/shop.env
ExecStart=/srv/flask/shop/.venv/bin/gunicorn --bind unix:/run/flask-shop.sock app:app
Restart=on-failure
[Install]
WantedBy=multi-user.target
Example admin service
[Unit]
Description=Admin Flask application
After=network.target
[Service]
User=flask-admin
Group=flask-admin
WorkingDirectory=/srv/flask/admin
EnvironmentFile=/etc/flask/admin.env
ExecStart=/srv/flask/admin/.venv/bin/gunicorn --bind unix:/run/flask-admin.sock app:create_app()
Restart=on-failure
[Install]
WantedBy=multi-user.target
Save the units under names such as flask-shop.service and flask-admin.service, then reload systemd, enable both services and start them. Check status and logs separately so a failing application does not hide a healthy one.
sudo systemctl daemon-reload
sudo systemctl enable --now flask-shop.service
sudo systemctl enable --now flask-admin.service
sudo systemctl status flask-shop.service
sudo systemctl status flask-admin.service
sudo journalctl -u flask-shop.service -e
sudo journalctl -u flask-admin.service -e
During a release, restart only the service whose code or environment changed. Independent units make rollback straightforward: restore that application’s previous code and dependencies, then restart its unit without interrupting the other applications.
Route hostnames through nginx
Hostname routing is usually the cleanest arrangement because each application receives URLs rooted at /. The proxy terminates public HTTP or TLS and forwards requests to the corresponding private socket.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchserver {
listen 80;
server_name shop.example.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://unix:/run/flask-shop.sock;
}
}
server {
listen 80;
server_name admin.example.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://unix:/run/flask-admin.sock;
}
}
After validating the configuration, reload nginx rather than stopping it. Keep the proxy’s public listener separate from the Unix sockets, and confirm that the nginx worker account can connect to each socket.
sudo nginx -t
sudo systemctl reload nginx
Use the forwarded host and protocol values deliberately. Flask URL generation, secure-cookie behavior and redirect URLs can be wrong if the application believes every request arrived as plain HTTP or under an internal hostname. Configure trusted proxy handling in the application according to your Flask and Werkzeug versions, and only trust headers inserted by your own proxy.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Route URL prefixes through nginx
A single hostname can serve several applications under prefixes such as /shop and /admin. Prefix routing requires more care than hostname routing because the upstream application must know whether the proxy removed the prefix.
server {
listen 80;
server_name example.com;
location /shop/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /shop;
proxy_pass http://unix:/run/flask-shop.sock/;
}
location /admin/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /admin;
proxy_pass http://unix:/run/flask-admin.sock/;
}
}
The trailing slash behavior in proxy_pass affects whether nginx strips the matched prefix. Decide on one contract: either the Flask app routes include the prefix, or the proxy removes it and the app is told the external prefix. Test links, redirects, static files, form actions and 404 pages under the real public path. A configuration that serves /admin/ but generates links to /login is not complete.
Static files and uploads
Choose whether nginx serves immutable static assets directly or forwards them to Flask. If nginx serves them, give each application a distinct filesystem location and URL prefix. Never point two applications at the same writable upload directory unless shared access is intentional and secured. Verify permissions for the proxy account and the service account independently.
Use DispatcherMiddleware when shared execution is intentional
Werkzeug’s DispatcherMiddleware combines multiple Flask WSGI applications and selects one based on a URL prefix. Each Flask app remains a valid WSGI application, but all of them run inside the same Python process family.
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from frontend_app import application as frontend
from backend_app import application as backend
application = DispatcherMiddleware(frontend, {
'/backend': backend,
})
Gunicorn can load this composed object like any other WSGI application:
gunicorn --bind unix:/run/combined.sock dispatch:application
This approach removes multiple service definitions and can avoid duplicate imports, but it couples dependency versions, memory space, process lifecycle and failure handling. If one application raises an import-time error, exhausts process memory or requires a restart, the composed service is affected. A shared interpreter is therefore appropriate only when the applications are maintained as one operational unit and their packages are compatible.
Recommended Free Tools
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
DispatcherMiddleware checks
- Confirm every application can run with the same Python and dependency versions.
- Make each prefix explicit and test both the prefixed URL and generated links.
- Give every mounted app its own static and upload locations.
- Use one logging and health-check strategy that can identify which prefix failed.
- Accept that scaling or restarting one mounted app independently is not available.
Choose Apache and mod_wsgi when it matches your platform
Apache with mod_wsgi is another production design. mod_wsgi maps requests to WSGI callables inside Apache-managed processes. Daemon mode lets you create separate process groups for stronger isolation and independent restarts.
By default, each WSGI application receives its own application group and sub-interpreter. The WSGIApplicationGroup setting can place compatible applications in a shared group to reduce duplicate imported-module memory, but sharing requires compatibility testing. Native extensions or libraries that expect the main interpreter may not work correctly in a non-standard sub-interpreter.
Use separate daemon process groups when dependency isolation and failure boundaries matter more than minimizing duplicate imports. Share a group only after validating imports, global state, thread behavior and release procedures. Apache still needs explicit virtual-host or location routing, permissions, logging and forwarded-header handling.
Compare the operational trade-offs
| Decision axis | Separate Gunicorn services | DispatcherMiddleware | Apache/mod_wsgi |
|---|---|---|---|
| Dependency isolation | Separate virtual environments and package versions. | One interpreter and dependency environment. | Separate daemon groups can isolate; shared groups require compatible applications. |
| Failure domain | A worker or restart normally affects one application. | Applications share the composed process and restart boundary. | Depends on whether daemon process groups are separated. |
| Routing model | nginx or Apache routes hostnames or paths. | WSGI dispatches by URL prefix. | Apache virtual hosts and locations route to WSGI callables. |
| Independent scaling | Scale workers for the busiest application without changing the others. | Scaling applies to the combined service. | Scale by daemon process-group configuration. |
| Deployment coupling | Each app can be released or rolled back separately. | One release and restart boundary for all mounted apps. | Can be independent with separate daemon groups. |
| Memory behavior | Duplicate imports are possible, but boundaries are explicit. | Shared imports may reduce duplication, while failures share memory. | Application-group choice controls sharing and isolation. |
Operate, monitor and scale each application
Health checks
Give every application a lightweight health endpoint that checks the condition you actually need to monitor. A process-level response confirms that workers accept requests; a deeper check may also verify a required database or queue. Keep checks fast and avoid making a health endpoint depend on an optional integration unless that dependency is part of the service’s availability contract.
Logs
Separate access and application logs by service. Include the hostname or path, status code, latency and a request identifier where possible. nginx or Apache records proxy-level failures; Gunicorn and Flask logs explain Python exceptions. When diagnosing a 502 response, inspect both the proxy log and the target service log rather than restarting everything.
Resource sizing
Measure memory, CPU, request latency and concurrency per application. A worker setting that is safe for a small read-only app may be harmful for a memory-heavy report generator. Increase workers only after observing available memory and queueing behavior. There is no authoritative universal worker-count formula in the Flask deployment material; workload measurements must drive the decision.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent releases
- Build and test one application’s artifact and dependencies.
- Stop accepting new traffic for that service only, or use a graceful reload supported by your process manager.
- Run migrations and smoke tests appropriate to that application.
- Reload its Gunicorn service and check its health endpoint through the proxy.
- Roll back that service alone if errors appear; leave unrelated applications running.
Secure the combined server
- Terminate TLS at nginx or Apache and redirect plain HTTP when appropriate.
- Bind Gunicorn to localhost or Unix sockets, not a public network interface, when a reverse proxy is used.
- Run each service under a dedicated unprivileged account.
- Restrict read and write permissions on source, environment files, sockets, static assets and uploads.
- Keep secrets in per-application environment files or a secret manager; do not reuse signing keys casually.
- Set trusted proxy behavior so clients cannot forge forwarded host, protocol or address headers.
- Apply request-size, timeout and rate controls at the proxy for endpoints that need them.
- Ensure error pages do not disclose stack traces or environment variables.
Troubleshoot the common failure modes
The proxy returns 502 or 503
Confirm the target service is running, the socket exists and nginx or Apache has permission to connect. Read the service log for import errors, missing environment variables and bind failures. If the service uses a TCP port, verify that the proxy points to the same address and port the Gunicorn command actually opened.
Every hostname reaches the same application
Check the proxy’s server-name or virtual-host matching and DNS records. Confirm that the intended default server is not catching requests because the hostname is misspelled or the configuration was not reloaded. Test each hostname with an explicit Host header against the proxy’s address.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minutePrefix routes produce 404s or broken redirects
Determine whether the proxy strips the prefix. Then align Flask routes, script-root or proxy-prefix handling and the Location headers generated by redirects. Test a page, a form submission, a static asset and a redirect under the external prefix.
One app fails after another app is upgraded
This usually indicates a shared virtual environment or shared WSGI process. Separate the environments and services, or pin compatible dependency versions if shared execution is intentional. Reproduce the import in each app’s own virtual environment before restarting production.
Static files work locally but not through the proxy
Check the public URL prefix, filesystem permissions and nginx or Apache location rules. If the proxy removes a prefix, ensure the generated asset URL and upstream route agree. Avoid using a single broad static location that can expose another application’s files.
Managed hosting alternatives
Flask’s deployment guidance lists PythonAnywhere, Google App Engine, Google Cloud Run, AWS Elastic Beanstalk and Microsoft Azure as hosting platforms that can remove some server administration. They still require decisions about application boundaries, routing, environment variables, logs and scaling. Availability, regional support and pricing vary, so verify current terms for the platform and region you plan to use.
Quick Recap
A practical decision checklist
- Choose separate Gunicorn services unless the applications are intentionally one release and one dependency environment.
- Assign each app a project directory, virtual environment, service account, private socket or port and environment file.
- Put nginx, Apache or an equivalent reverse proxy in front for public HTTP, TLS and routing.
- Use hostname routing when you want each app to behave as if it owns the root URL.
- Use path routing only after testing prefix-aware links, redirects, cookies and static files.
- Use DispatcherMiddleware for compatible applications that can share a process and failure domain.
- Use Apache/mod_wsgi daemon groups when that ecosystem fits your operations and you need Apache-managed WSGI processes.
- Monitor memory, latency, errors and restarts per application before changing worker counts.
- Test independent restarts, rollback, health checks, forwarded headers and permission boundaries before declaring the server ready.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




