38 lines
756 B
Text
38 lines
756 B
Text
# nginx config for home.wezm.net
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name home.wezm.net;
|
|
|
|
location = / {
|
|
rewrite . /~wmoore/ redirect;
|
|
}
|
|
|
|
location = /~wmoore/about.html {
|
|
rewrite . /~wmoore/cgi-bin/about.cgi redirect;
|
|
}
|
|
|
|
location = /~wmoore/ {
|
|
proxy_pass http://127.0.0.1:8000/;
|
|
}
|
|
|
|
location ~ ^/~wmoore/cgi-bin(/[^.]+.cgi)$ {
|
|
proxy_pass http://127.0.0.1:8000/cgi-bin$1;
|
|
}
|
|
|
|
location ~ ^/~wmoore(/.*)?$ {
|
|
alias /home/wmoore/home.wezm.net/public$1;
|
|
autoindex on;
|
|
}
|
|
|
|
# Everything else is a 404
|
|
location / {
|
|
return 404;
|
|
}
|
|
|
|
# You may need this to prevent return 404 recursion.
|
|
location = /404.html {
|
|
internal;
|
|
}
|
|
}
|