-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vit01
committed
Jul 23, 2022
1 parent
7a0c330
commit 9ac9115
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<%- | String $key, String $cert | -%> | ||
upstream gitea { | ||
server 127.0.0.1:3003; | ||
} | ||
|
||
server { | ||
listen <%= $facts['networking']['ip'] %>:3000 ssl; | ||
server_name _; | ||
|
||
ssl_certificate <%= $cert %>; # managed by Certbot | ||
ssl_certificate_key <%= $key %>; # managed by Certbot | ||
|
||
location / { | ||
proxy_pass http://gitea; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|
||
proxy_set_header Origin ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<%- | String $key, String $cert | -%> | ||
upstream gotify { | ||
server 127.0.0.1:3001; | ||
} | ||
|
||
server { | ||
listen <%= $facts['networking']['ip'] %>:3001 ssl; | ||
server_name _; | ||
|
||
ssl_certificate <%= $cert %>; # managed by Certbot | ||
ssl_certificate_key <%= $key %>; # managed by Certbot | ||
|
||
location / { | ||
proxy_pass http://gotify; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_set_header Host $host; | ||
|
||
proxy_set_header Origin ""; | ||
} | ||
} |