36 lines
903 B
Plaintext
36 lines
903 B
Plaintext
# minimal standalone nginx config for development
|
|
# sufficient to serve a capybara-generated site tree
|
|
|
|
daemon off;
|
|
master_process off;
|
|
error_log /dev/stderr info;
|
|
pid /tmp/nginx-capybara.pid;
|
|
|
|
events {}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
charset UTF-8;
|
|
types_hash_max_size 4096;
|
|
access_log /dev/stdout;
|
|
gzip on;
|
|
|
|
map $http_user_agent $mathjax_polyfill {
|
|
default "<script type='text/javascript' src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>";
|
|
"~Mozilla.*Firefox/[0-9]+" "";
|
|
}
|
|
|
|
server {
|
|
server_name localhost;
|
|
listen 8080 default;
|
|
root @PWD;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
sub_filter "__X_MATHJAX_POLYFILL_PLACEHOLDER__" $mathjax_polyfill;
|
|
}
|
|
}
|
|
}
|