summaryrefslogtreecommitdiff
path: root/doc/nginx.conf.example
diff options
context:
space:
mode:
Diffstat (limited to 'doc/nginx.conf.example')
-rw-r--r--doc/nginx.conf.example24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/nginx.conf.example b/doc/nginx.conf.example
new file mode 100644
index 0000000..403c66e
--- /dev/null
+++ b/doc/nginx.conf.example
@@ -0,0 +1,24 @@
+# -*- mode: nginx; nginx-indent-level: 8; intent-tabs-mode: t -*-
+
+server {
+ server_name www.andrewdm.me;
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+
+ if (-d /srv/http/$server_name/out/$uri) {
+ rewrite ^(.*[^/])$ $1/ permanent;
+ }
+
+ location ~ [A-Z] {
+ uwsgi_pass unix:/run/uwsgi/www.sock;
+ uwsgi_modifier1 9; # Standard CGI request
+ include uwsgi_params;
+ }
+
+ location / {
+ try_files /out$uri/index.html /out$uri /src$uri =404;
+ }
+ location /search.html {
+ return 302 https://duckduckgo.com/?q=site:$host+$arg_s;
+ }
+}