aboutsummaryrefslogtreecommitdiff
path: root/gerboweb/deploy/nginx.conf
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2020-03-30 00:55:33 +0200
committerjaseg <code@jaseg.net>2020-03-30 00:55:33 +0200
commit0dcc11ebd03a6b80e9d930ab9edf5fe74291f95b (patch)
tree525e098156e7df30a13dd4ba981e6e3d4bc9a745 /gerboweb/deploy/nginx.conf
parent78ce3bb25747a0966445ffd5360ad31ad4fb098a (diff)
downloadgerbolyze-0dcc11ebd03a6b80e9d930ab9edf5fe74291f95b.tar.gz
gerbolyze-0dcc11ebd03a6b80e9d930ab9edf5fe74291f95b.tar.bz2
gerbolyze-0dcc11ebd03a6b80e9d930ab9edf5fe74291f95b.zip
Add gitolite/cgit git hosting
Diffstat (limited to 'gerboweb/deploy/nginx.conf')
-rw-r--r--gerboweb/deploy/nginx.conf48
1 files changed, 48 insertions, 0 deletions
diff --git a/gerboweb/deploy/nginx.conf b/gerboweb/deploy/nginx.conf
index f3400cc..b4245fa 100644
--- a/gerboweb/deploy/nginx.conf
+++ b/gerboweb/deploy/nginx.conf
@@ -322,5 +322,53 @@ http {
root /usr/share/nginx/html;
}
}
+
+ server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ server_name git.jaseg.net;
+ root /usr/share/nginx/html;
+
+ ssl_certificate "/etc/letsencrypt/live/git.jaseg.net/fullchain.pem";
+ ssl_certificate_key "/etc/letsencrypt/live/git.jaseg.net/privkey.pem";
+ ssl_dhparam "/etc/letsencrypt/ssl-dhparams.pem";
+ include /etc/letsencrypt/options-ssl-nginx.conf;
+
+ ssl_stapling on;
+ ssl_stapling_verify on;
+
+ resolver 67.207.67.2 67.207.67.3 valid=300s;
+ resolver_timeout 10s;
+
+ add_header Strict-Transport-Security "max-age=86400";
+
+ # Load configuration files for the default server block.
+ include /etc/nginx/default.d/*.conf;
+
+ location ~ ^/(cgit.css|robots.txt) {
+ root /usr/share/cgit;
+ expires 30d;
+ }
+
+ location ~ ^/(cgit.png|favicon.png) {
+ alias /var/www/git.jaseg.net/cgit.png;
+ }
+
+ location / {
+ include uwsgi_params;
+ uwsgi_modifier1 9;
+ uwsgi_pass unix:/run/uwsgi/cgit.socket;
+ }
+
+ error_page 404 /404.html;
+ location = /40x.html {
+ root /usr/share/nginx/html;
+ }
+
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root /usr/share/nginx/html;
+ }
+ }
}