Example Proxy Configurations #2

Closed
opened 2026-02-28 01:31:19 -05:00 by deekerman · 4 comments
Owner

Originally created by @TheGuyDanish on GitHub (Jul 11, 2021).

Given that not many people are exposing Docker containers directly to the internet, having an example of a nginx or apache config that allows proxying could be beneficial. I tried looking at it myself, but all my attempts with apache are coming up moot. Hopefully someone smarter than me can figure this out.

Originally created by @TheGuyDanish on GitHub (Jul 11, 2021). Given that not many people are exposing Docker containers directly to the internet, having an example of a nginx or apache config that allows proxying could be beneficial. I tried looking at it myself, but all my attempts with apache are coming up moot. Hopefully someone smarter than me can figure this out.
deekerman 2026-02-28 01:31:19 -05:00
Author
Owner

@12nick12 commented on GitHub (Jul 11, 2021):

I'm an NGiNX guy so here's my config. In NGiNX we have to specify websockets so I'm assuming you might have to do the same in apache

  listen 443 ssl http2;
  server_name sub.domain.comt;
  ssl_certificate     /path/to/ssl/cert/crt;
  ssl_certificate_key /path/to/ssl/key/key;

  location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass           http://localhost:3001/;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
  }
}
@12nick12 commented on GitHub (Jul 11, 2021): I'm an NGiNX guy so here's my config. In NGiNX we have to specify websockets so I'm assuming you might have to do the same in apache ```server { listen 443 ssl http2; server_name sub.domain.comt; ssl_certificate /path/to/ssl/cert/crt; ssl_certificate_key /path/to/ssl/key/key; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:3001/; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } }
Author
Owner

@TheGuyDanish commented on GitHub (Jul 11, 2021):

Got it after some configuration testing.

<VirtualHost *:80>
  ServerName sub.domain.com

  ProxyPass / http://localhost:3001/
  RewriteEngine on
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteCond %{HTTP:Connection} upgrade [NC]
  RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L]
</VirtualHost>

I think adding these to documentation could be a good call @louislam

@TheGuyDanish commented on GitHub (Jul 11, 2021): Got it after some configuration testing. ```apache <VirtualHost *:80> ServerName sub.domain.com ProxyPass / http://localhost:3001/ RewriteEngine on RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L] </VirtualHost> ``` I think adding these to documentation could be a good call @louislam
Author
Owner

@Stetsed commented on GitHub (Jul 11, 2021):

I will write an edit for examples of reverse proxys.

@Stetsed commented on GitHub (Jul 11, 2021): I will write an edit for examples of reverse proxys.
Author
Owner

@TheGuyDanish commented on GitHub (Jul 13, 2021):

I've added the example configurations to a new wiki page at https://github.com/louislam/uptime-kuma/wiki/Webserver-Reverse-Proxy. Closing this.

@TheGuyDanish commented on GitHub (Jul 13, 2021): I've added the example configurations to a new wiki page at https://github.com/louislam/uptime-kuma/wiki/Webserver-Reverse-Proxy. Closing this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#2
No description provided.