Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:quick_reverse_proxy_config_for_nginx [2020/02/16 18:00]
vern [Quick reverse proxy config for nginx]
linux:quick_reverse_proxy_config_for_nginx [2020/02/16 18:11] (current)
vern [Quick reverse proxy config for nginx]
Line 1: Line 1:
 ==== Quick reverse proxy config for nginx ==== ==== 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.+[[https://www.nginx.org/|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 ... Here is an example config ...
 <code> <code>
 server { server {
-        server_name example.vernon.wenberg.net;+        server_name example.vernon.wenberg.net; # must match the sub.host portion of the URL
         proxy_set_header Host   $host;         proxy_set_header Host   $host;
         proxy_set_header X-Real-IP $remote_addr;         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        client_max_body_size 100M;+        client_max_body_size 100M; # increase size of uploaded files
         location / {         location / {
-                proxy_pass http://internal-service.vernon.wenberg.net:82;+                proxy_pass http://internal-service.vernon.wenberg.net:82; # internal server address and port
         }         }
 # Insert SSL certificate block here # Insert SSL certificate block here