mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
31 lines
878 B
Nginx Configuration File
31 lines
878 B
Nginx Configuration File
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;
|
|
}
|
|
}
|