dpaste/server_configs/dev/nginx.conf

32 lines
878 B
Nginx Configuration File
Raw Normal View History

2011-05-30 09:03:04 +10:00
upstream pastebin {
server pastebin.dev.lincolnloop.com:9000;
}
server {
listen 80;
server_name www.pastebin.dev.lincolnloop.com;
rewrite ^/(.*) http://pastebin.dev.lincolnloop.com/$1 permanent;
}
server {
listen 80;
server_name pastebin.dev.lincolnloop.com;
root /var/www/pastebin.dev.lincolnloop.com/;
access_log /var/log/nginx/pastebin.dev.lincolnloop.com.access.log;
location / {
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (!-f $request_filename) {
proxy_pass http://pastebin;
}
include /etc/nginx/proxy-setup.inc.conf;
}
# Serve up apache log on dev host. Useful for debugging.
location /apache.log {
alias /var/log/apache2/pastebin.dev.lincolnloop.com.log;
}
}