Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Proxy Configurations #3

Closed
TheGuyDanish opened this issue Jul 11, 2021 · 4 comments
Closed

Example Proxy Configurations #3

TheGuyDanish opened this issue Jul 11, 2021 · 4 comments
Labels
area:documentation Improvements or additions to documentation

Comments

@TheGuyDanish
Copy link
Contributor

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.

@12nick12
Copy link

12nick12 commented 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;
  }
}

@TheGuyDanish
Copy link
Contributor Author

TheGuyDanish commented 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

@Stetsed
Copy link

Stetsed commented Jul 11, 2021

I will write an edit for examples of reverse proxys.

@louislam louislam added area:documentation Improvements or additions to documentation good first issue Good for newcomers and removed good first issue Good for newcomers labels Jul 12, 2021
@TheGuyDanish
Copy link
Contributor Author

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants