diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-07-08 19:33:13 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-07-08 19:33:13 -0400 |
| commit | d03619fc2ac6c7e66432277ae4098db9274cd0b1 (patch) | |
| tree | fd4e79d8ff5f6d5e3a1181b491bb2df7d8a58e34 /configuration/nginx/homepage.conf | |
| parent | 26e913c1b0ed20235a4570900e8c66d1f2996054 (diff) | |
cgit css
Diffstat (limited to 'configuration/nginx/homepage.conf')
| -rw-r--r-- | configuration/nginx/homepage.conf | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/configuration/nginx/homepage.conf b/configuration/nginx/homepage.conf new file mode 100644 index 0000000..1095107 --- /dev/null +++ b/configuration/nginx/homepage.conf @@ -0,0 +1,69 @@ +# https server +server { + server_name jackjamison.net www.jackjamison.net; + + error_page 404 = /404.html; + location = /404.html { + internal; + root /var/www/homepage/404.html; + } + + location /interactive { + alias /var/www/interactive/; + } + + location / { + root /var/www/homepage; + index index.html; + } + + listen [::]:443 ssl; + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/jackjamison.net/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/jackjamison.net/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; +} + +# git server +server { + server_name git.jackjamison.net; + root /usr/share/cgit; + try_files $uri @cgit; + + # http cloning + location ~ /.+/(info/refs|git-upload-pack) { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; + fastcgi_param PATH_INFO $uri; + fastcgi_param GIT_PROJECT_ROOT /var/git/repositories; + fastcgi_param HOME /var/git/repositories; + fastcgi_pass unix:/run/fcgiwrap.socket; + } + + # else + location @cgit { + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; + fastcgi_param PATH_INFO $uri; + fastcgi_param QUERY_STRING $args; + fastcgi_param HTTP_HOST $server_name; + fastcgi_pass unix:/run/fcgiwrap.socket; + } + + listen [::]:443 ssl; + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/git.jackjamison.net/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/git.jackjamison.net/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; +} + +# http redirect +server { + listen [::]:80 default_server; + listen 80 default_server; + server_name _; + + return 301 https://$host$request_uri; +}
\ No newline at end of file |
