fix to install script, add ordering to dmails
This commit is contained in:
@@ -92,7 +92,7 @@ update-rc.d -f nginx defaults
|
|||||||
mkdir -p /opt/nginx/conf/sites
|
mkdir -p /opt/nginx/conf/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
|
sed -i -e 's/__hostname__/$HOSTNAME/g' /opt/nginx/conf/sites/danbooru.conf
|
||||||
/etc/init.d/nginx start
|
/etc/init.d/nginx start
|
||||||
|
|
||||||
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
|
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
|
||||||
@@ -137,8 +137,8 @@ echo "* modify the config/deploy/staging.rb and production.rb *"
|
|||||||
echo "* files to point to the correct servers. Then run: *"
|
echo "* files to point to the correct servers. Then run: *"
|
||||||
echo "* cap deploy:setup && cap deploy *"
|
echo "* cap deploy:setup && cap deploy *"
|
||||||
echo "* *"
|
echo "* *"
|
||||||
echo "* The first account will automatically be made an admin. You *"
|
echo "* The first account will automatically be made an admin. *"
|
||||||
echo "* can edit the configuration files by editing *"
|
echo "* You can edit the configuration files by editing *"
|
||||||
echo "* /var/www/danbooru/shared/config/local_config and *"
|
echo "* /var/www/danbooru/shared/config/local_config and *"
|
||||||
echo "* /var/www/danbooru/shared/config/database.yml *"
|
echo "* /var/www/danbooru/shared/config/database.yml *"
|
||||||
echo "**************************************************************"
|
echo "**************************************************************"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class DmailsController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
@search = Dmail.search(params[:search])
|
@search = Dmail.search(params[:search])
|
||||||
@dmails = @search.paginate(params[:page])
|
@dmails = @search.paginate(params[:page]).order("id desc")
|
||||||
@dmails.each {|x| check_privilege(x)}
|
@dmails.each {|x| check_privilege(x)}
|
||||||
respond_with(@dmails)
|
respond_with(@dmails)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
server {
|
server {
|
||||||
passenger_enabled on;
|
passenger_enabled on;
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name $hostname;
|
server_name __hostname__;
|
||||||
root /var/www/danbooru/current/public;
|
root /var/www/danbooru/current/public;
|
||||||
index index.html;
|
index index.html;
|
||||||
access_log /var/log/www/danbooru.access.log;
|
access_log /var/log/www/danbooru.access.log;
|
||||||
@@ -16,7 +16,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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user