From 8031893ea7a51edd63b990a2a1c7b645237a342d Mon Sep 17 00:00:00 2001 From: albert Date: Fri, 26 Aug 2011 17:13:05 -0400 Subject: [PATCH] install script fixes --- INSTALL.debian | 1 + script/install/nginx.danbooru.conf | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/INSTALL.debian b/INSTALL.debian index d11913857..581dadf15 100644 --- a/INSTALL.debian +++ b/INSTALL.debian @@ -68,6 +68,7 @@ update-rc.d -f nginx defaults mkdir -p /opt/nginx/sites curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.conf > /opt/nginx/conf/nginx.conf curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.danbooru.conf > /opt/nginx/conf/sites/danbooru.conf +sed -i -e 's/HOSTNAME/$hostname/g' /opt/nginx/conf/sites/danbooru.conf /etc/init.d/nginx start # Create user account diff --git a/script/install/nginx.danbooru.conf b/script/install/nginx.danbooru.conf index df756ff36..4457d6751 100644 --- a/script/install/nginx.danbooru.conf +++ b/script/install/nginx.danbooru.conf @@ -1,6 +1,6 @@ server { listen 80; - server_name $hostname; + server_name HOSTNAME; root /var/www/danbooru/public; index index.html; access_log /var/www/danbooru/log/server.access.log; @@ -15,7 +15,7 @@ server { break; } location /data { - valid_referers none $hostname; + valid_referers none HOSTNAME; if ($invalid_referer) { return 403; } @@ -29,15 +29,6 @@ server { rewrite ^(.*)$ /maintenance.html last; break; } - location / { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_redirect false; - if (!-f $request_filename) { - proxy_pass http://mongrel; - } - } error_page 404 /404.html; error_page 500 502 503 504 /500.html; } \ No newline at end of file