Index

joshstock.in / c4f7c6c

Source for serving and static templating/compiling of https://joshstock.in.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
16321 Jan 2023 10:1029e63ddPoint 404 error pages to correct file locationJosh Stockin122G

Blob @ joshstock.in / nginx / prod / servers / git.conf

text/plain1083 bytesdownload raw
1lua_package_path "/usr/local/lib/lua/5.1/?.lua;/srv/resty-gitweb/?.lua;;";
2lua_package_cpath "/usr/local/lib/lua/5.1/?.so;;";
3
4init_by_lua_file /srv/resty-gitweb/init.lua;
5
6server {
7 listen 443 ssl http2;
8 listen [::]:443 ssl http2;
9 server_name git.joshstock.in;
10 rewrite ^/(.*)/(\?.*)?$ /$1$2 permanent;
11 error_page 404 /error/404.html; location = /error/404.html {
12 root /var/www/josh/static;
13 }
14 location / {
15 default_type text/html;
16 content_by_lua_file /srv/resty-gitweb/app.lua;
17 }
18 location = /favicon.ico {
19 root /var/www/josh;
20 try_files /static/favicon.ico =404;
21 }
22 location = /static/favicon.png {
23 root /var/www/josh;
24 }
25 location ~ ^/([^\/]*)\.git {
26 fastcgi_intercept_errors on;
27 fastcgi_pass unix:/var/run/fcgiwrap.socket;
28 include fastcgi_params;
29 fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
30 fastcgi_param GIT_HTTP_EXPORT_ALL "";
31 fastcgi_param GIT_PROJECT_ROOT /home/git;
32 fastcgi_param PATH_INFO $uri;
33 }
34}
35