Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallTo put an HTTP application behind NGINX on Ubuntu 26.04, install NGINX from Ubuntu’s packages, create a server block that sends requests to the application with proxy_pass, enable the site, test the configuration, and reload NGINX. This host-based guide assumes your application is already running and you know its listening address and port. Replace app.example.com and 127.0.0.1:8080 with your own hostname and upstream. For public access, DNS must point to this server and network rules must permit the required traffic.
1. Install NGINX and check the service
Ubuntu’s server documentation gives these commands for installing NGINX and checking its service status:
As an Amazon Associate I earn from qualifying purchases.
sudo apt update
sudo apt install nginx
sudo systemctl status nginx
APT installs the package from your configured Ubuntu repositories; the installed revision can change as updates are published. Check your Ubuntu release, repository configuration, and installed package rather than assuming a particular version. The NGINX package listing includes Ubuntu 26.04 “Resolute” for x86_64 and ARM64, but that does not guarantee a specific revision in every repository or on every host. Ubuntu: Install and configure NGINX · NGINX packages for Ubuntu
The Ubuntu Resolute manpage listing showed 1.28.3-2ubuntu1.10 at the time it was retrieved; treat that as a point-in-time package listing, not a version promise. Keep Ubuntu and NGINX security updates current. Ubuntu’s advisory for CVE-2026-1642 describes an issue involving NGINX proxying to upstream TLS servers and lists a fixed Resolute package version; consult the current advisory and your installed package status for up-to-date details. Ubuntu security notice: CVE-2026-1642 · Ubuntu Resolute NGINX manpage
#1 Best Overall
2. Create a server block for the application
Ubuntu’s packaged layout keeps available site configurations in /etc/nginx/sites-available/ and activates them through symlinks in /etc/nginx/sites-enabled/. Create a file for the hostname:
sudo nano /etc/nginx/sites-available/app.example.com
For an application listening on HTTP at 127.0.0.1:8080 on the same server, use this basic configuration:
server {
listen 80;
listen [::]:80;
server_name app.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
server_name must match the hostname clients request, and the address in proxy_pass must be where the application actually listens. Use a reachable private or public address instead of loopback if the upstream runs on another machine. NGINX’s reverse-proxy guide describes proxying as a way to distribute load among servers, serve content from different websites, or pass requests to application servers over other protocols. NGINX: ngx_http_proxy_module · NGINX: Reverse proxy
Rank #2
3. Choose how NGINX maps request paths
The slash—or lack of one—at the end of proxy_pass changes URI handling when it includes a URI component. With location /, proxy_pass http://127.0.0.1:8080; has no URI after the upstream address, so NGINX passes the request URI through. A request for /orders/42 reaches the upstream as /orders/42.
If instead you configure location /app/ with proxy_pass http://127.0.0.1:8080/;, the slash after the upstream address supplies a URI. NGINX replaces the part of the request URI that matches the location: a request for /app/orders/42 is sent upstream as /orders/42. This is useful when the application expects to run at the root path, but wrong if it expects the /app/ prefix. Choose the form that matches the application’s base path. NGINX: proxy_pass URI handling
4. Enable the site, test, and reload
Create the enabling symlink, validate the NGINX configuration, and reload the service only if the test succeeds:
Rank #3
sudo ln -s /etc/nginx/sites-available/app.example.com /etc/nginx/sites-enabled/app.example.com
sudo nginx -t
sudo systemctl reload nginx
nginx -t checks configuration syntax and can report file or directive errors; it does not verify that the upstream application is healthy or reachable. If the test fails, fix the reported problem and run it again before reloading. Ubuntu documents the available/enabled symlink layout and the reload workflow. Ubuntu: NGINX site configuration and service management
Recommended Free Tools
If the default server block answers instead of your new site, inspect the enabled configurations and their server names. Disable the default site only after checking whether it serves an existing site or is needed for other hostnames; do not remove it blindly. To inspect the service after reloading, use sudo systemctl status nginx. Then request the hostname and check both the response and NGINX’s error log if the application does not appear.
5. Make the hostname reachable
For a public hostname, create or update its DNS record to point to the server and make sure the server’s firewall and any upstream network firewall allow inbound HTTP traffic. The application must be listening on the configured upstream address and port. A local-only application bound to 127.0.0.1 is reachable from NGINX on the same host, not directly from remote clients.
Rank #4
For an internal-only service, use the appropriate private DNS and network access. A public certificate is not required for a private HTTP test, though browser-to-proxy encryption may still be important for a service used over an untrusted network.
6. Add HTTPS for a public hostname (optional)
Ubuntu documents Certbot, installed as a snap, as an ACME client for obtaining certificates and configuring NGINX. Once the domain points to the server and the required public validation traffic can reach it, install Certbot and request a certificate for your actual hostname:
sudo snap install --classic certbot
sudo certbot --nginx -d app.example.com
For a second hostname such as www.app.example.com, include another -d option only if its DNS also points to this server and you intend to serve it. The NGINX plugin finds matching server blocks, adds TLS directives, and reloads NGINX. Certificate issuance depends on the domain and validation path being suitable; the command does not make an unconfigured or unreachable domain eligible. Ubuntu: Configure NGINX with TLS certificates
7. If the upstream itself uses HTTPS
Browser-to-NGINX HTTPS and NGINX-to-upstream HTTPS are separate connections. Setting an upstream URL to https:// encrypts transport, but NGINX’s proxy module documents certificate verification as off by default. For a remote or otherwise untrusted HTTPS upstream, configure verification deliberately: provide the appropriate trust roots with proxy_ssl_trusted_certificate, enable verification with proxy_ssl_verify on;, and use proxy_ssl_server_name on; when the upstream relies on SNI. Ensure the certificate name and trust chain match the upstream. Do not treat an encrypted connection alone as proof that NGINX is talking to the intended server. NGINX: proxy_ssl_verify and related proxy TLS directives
8. Add application-specific proxy settings only when needed
The minimal block above is not a universal application configuration. NGINX changes the proxied Host and Connection headers by default; the example explicitly passes the requested host and client address. Some applications also need the original scheme or a forwarded client-address chain to generate correct redirects, URLs, or logs. Configure those headers to suit the application, and configure the application to trust only the proxy addresses it should trust. Forwarded headers supplied by clients are not automatically trustworthy.
Other settings depend on the application rather than on reverse proxying in general:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- WebSockets: add the appropriate upgrade handling if the application uses WebSocket connections.
- Request body size: adjust the body-size limit if legitimate uploads exceed the configured limit.
- Timeouts or buffering: tune them only when the application’s response behavior requires it.
- Base paths: confirm whether the app serves at
/or expects a prefix, then match thelocationandproxy_passURI behavior.
NGINX’s proxy documentation explains the available directives, but the correct values depend on the backend’s behavior and trust model. NGINX: ngx_http_proxy_module
Quick Recap
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.




