Index

joshstock.in / 5022cc0

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

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
11505 Mar 2021 00:445022cc0Add resty-gitweb to nginx configurationJosh Stockin1110G

Blob @ joshstock.in / nginx / nginx.conf

text/plain1490 bytesdownload raw
1user www-data;
2worker_processes auto;
3pid /run/nginx.pid;
4include /etc/nginx/modules-enabled/*.conf;
5
6env RESTY_GITWEB_ENABLED=;
7env RESTY_GITWEB_ENV=PROD;
8env RESTY_GITWEB_CONFIG=/home/ubuntu/joshstock.in/deploy/resty-gitweb.yaml;
9
10events {
11 worker_connections 768;
12 # multi_accept on;
13}
14
15http {
16 sendfile on;
17 tcp_nopush on;
18 tcp_nodelay on;
19 keepalive_timeout 65;
20 types_hash_max_size 2048;
21 # server_tokens off;
22
23 # server_names_hash_bucket_size 64;
24 # server_name_in_redirect off;
25
26 include /etc/nginx/mime.types;
27 default_type application/octet-stream;
28
29 ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
30 ssl_prefer_server_ciphers on;
31
32 access_log /var/log/nginx/access.log;
33 error_log /var/log/nginx/error.log;
34
35 gzip on;
36
37 # gzip_vary on;
38 gzip_proxied any;
39 gzip_comp_level 8;
40 # gzip_buffers 16 8k;
41 # gzip_http_version 1.1;
42 gzip_types *;
43
44 # Add resty-gitweb to your Lua package path
45 lua_package_cpath "/usr/local/lib/lua/5.1;;"
46 lua_package_path "/usr/local/share/lua/5.1;/srv/[SITE]/resty-gitweb/?.lua;;";
47
48 # Initialize modules for nginx workers
49 init_by_lua_file /srv/[SITE]/resty-gitweb/init.lua;
50
51 server {
52 listen 443 ssl http2;
53 listen [::]:443 ssl http2;
54 return 404;
55 }
56
57 include /etc/nginx/conf.d/*.conf;
58 include /etc/nginx/sites-enabled/*;
59
60 # import server configuration
61 include /etc/nginx/joshstock.in/*.conf;
62}
63