nginx + forgejo + some content on zospace
This commit is contained in:
parent
68de124dfd
commit
f8b22b6a5d
3 changed files with 42 additions and 12 deletions
30
machines/homelab/nginx.nix
Normal file
30
machines/homelab/nginx.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
security.acme.acceptTerms = true;
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts = {
|
||||
"zospace.freeboxos.fr" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/".root = "/var/www/zospace.freeboxos.fr/";
|
||||
|
||||
locations."/forgejo/" = {
|
||||
extraConfig = ''
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
client_max_body_size 512M;
|
||||
proxy_pass http://localhost:8888/;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue