commit
1229bfe690
1 changed files with 76 additions and 0 deletions
@ -0,0 +1,76 @@ |
|||
In order to to expose uptime-kuma to the web securely, it is recommended to proxy it behind a traditional webserver such as nginx or Apache. Below are some example configurations that you could use. |
|||
|
|||
### Nginx |
|||
|
|||
With SSL: |
|||
```nginx |
|||
server { |
|||
listen 443 ssl http2; |
|||
server_name sub.domain.com; |
|||
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; |
|||
} |
|||
} |
|||
``` |
|||
|
|||
Without SSL: |
|||
```nginx |
|||
server { |
|||
listen 80; |
|||
server_name sub.domain.com; |
|||
location / { |
|||
proxy_pass http://localhost:3001; |
|||
proxy_http_version 1.1; |
|||
proxy_set_header Upgrade $http_upgrade; |
|||
proxy_set_header Connection "upgrade"; |
|||
proxy_set_header Host $host; |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### Apache |
|||
Without SSL: |
|||
```apache |
|||
<VirtualHost *:443> |
|||
ServerName sub.domain.com |
|||
SSLEngine On |
|||
SSLCertificateFile /path/to/ssl/cert/crt |
|||
SSLCertificateKeyFile /path/to/ssl/key/key |
|||
# Protocol 'h2' is only supported on Apache 2.4.17 or newer. |
|||
Protocols h2 http/1.1 |
|||
|
|||
ProxyPass / http://localhost:3001/ |
|||
RewriteEngine on |
|||
RewriteCond %{HTTP:Upgrade} websocket [NC] |
|||
RewriteCond %{HTTP:Connection} upgrade [NC] |
|||
RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L] |
|||
</VirtualHost> |
|||
``` |
|||
|
|||
Without SSL: |
|||
```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> |
|||
``` |
|||
|
|||
### Caddy |
|||
|
|||
```nginx |
|||
subdomain.domain.com { |
|||
reverse_proxy 127.0.0.1:3001 : |
|||
} |
|||
``` |
Loading…
Reference in new issue