install script fixes
This commit is contained in:
@@ -68,6 +68,7 @@ update-rc.d -f nginx defaults
|
|||||||
mkdir -p /opt/nginx/sites
|
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.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
|
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
|
/etc/init.d/nginx start
|
||||||
|
|
||||||
# Create user account
|
# Create user account
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name $hostname;
|
server_name HOSTNAME;
|
||||||
root /var/www/danbooru/public;
|
root /var/www/danbooru/public;
|
||||||
index index.html;
|
index index.html;
|
||||||
access_log /var/www/danbooru/log/server.access.log;
|
access_log /var/www/danbooru/log/server.access.log;
|
||||||
@@ -15,7 +15,7 @@ server {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
location /data {
|
location /data {
|
||||||
valid_referers none $hostname;
|
valid_referers none HOSTNAME;
|
||||||
if ($invalid_referer) {
|
if ($invalid_referer) {
|
||||||
return 403;
|
return 403;
|
||||||
}
|
}
|
||||||
@@ -29,15 +29,6 @@ server {
|
|||||||
rewrite ^(.*)$ /maintenance.html last;
|
rewrite ^(.*)$ /maintenance.html last;
|
||||||
break;
|
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 404 /404.html;
|
||||||
error_page 500 502 503 504 /500.html;
|
error_page 500 502 503 504 /500.html;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user