mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-20 14:02:34 +02:00
Adding Reverse Proxy Examples: Requested in Issue #3
Added reverse proxy examples for Caddy, Nginx with and without Certbot, And Apache.
This commit is contained in:
parent
b198b3dde4
commit
61aad53d47
1 changed files with 57 additions and 0 deletions
57
README.md
57
README.md
|
@ -55,6 +55,63 @@ Browse to http://localhost:3001 after started.
|
||||||
|
|
||||||
[](https://cloud.digitalocean.com/apps/new?repo=https://github.com/louislam/uptime-kuma/tree/master&refcode=e2c7eb658434)
|
[](https://cloud.digitalocean.com/apps/new?repo=https://github.com/louislam/uptime-kuma/tree/master&refcode=e2c7eb658434)
|
||||||
|
|
||||||
|
### Reverse Proxy Examples
|
||||||
|
|
||||||
|
Nginx with Certbot
|
||||||
|
````
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name subdomain.domain.com
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:3001
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
````
|
||||||
|
|
||||||
|
Nginx without Certbot
|
||||||
|
````
|
||||||
|
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://127.0.0.1:3001/;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Credit to 12nick12
|
||||||
|
````
|
||||||
|
Apache
|
||||||
|
````
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName sub.domain.com
|
||||||
|
|
||||||
|
ProxyPass / http://127.0.0.1:3001/
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
|
RewriteCond %{HTTP:Connection} upgrade [NC]
|
||||||
|
RewriteRule ^/?(.*) "ws://127.0.0.1:3001/$1" [P,L]
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
Credit to TheGuyDanish
|
||||||
|
````
|
||||||
|
|
||||||
|
Caddy
|
||||||
|
````
|
||||||
|
subdomain.domain.com {
|
||||||
|
reverse_proxy 127.0.0.1:3001 :
|
||||||
|
}
|
||||||
|
````
|
||||||
|
|
||||||
|
|
||||||
# More Screenshots
|
# More Screenshots
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue