Skip to content
Menu
vernon.wenberg.net
vernon.wenberg.net
June 10, 2021February 21, 2022

Quick reverse proxy config for nginx

nginx is my preferred lightweight HTTP/HTTPS server and fairly easy to do reverse proxy for. In this
example, I use a reverse proxy to expose an internal service running on port 82 to the Internet.
Here is an example config …

server {
server_name example.vernon.wenberg.net; # must match the sub.host
portion of the URL
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100M; # increase size of uploaded files
location / {
proxy_pass http://internal-service.vernon.wenberg.net:82; #
internal server address and port
}
# Insert SSL certificate block here
}

example.vernon.wenberg.net is a sub-domain that exists on the public Internet while
internal-service.vernon.wenberg is an internal system. This also allows the use of an SSL
certificate on your nginx server instead of your internal server.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to print (Opens in new window) Print
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Like this:

Like Loading...

Related

Disclaimer

These posts are notes for me. These are not guides and you should not use these instructions as step-by-step instructions without knowing what they do.

Recent Posts

  • Docker Reference
  • Useful Commands for Windows Subsystem for Linux
  • FortiManager Local-In Policy
  • Mount Google Drive in Linux using rclone
  • Restore original Explorer context menus in Windows 11

Mastodon

  1. Loading Mastodon feed...

©2025 vernon.wenberg.net | Powered by WordPress and Superb Themes!
%d