1
0
Fork 0

Nginx config, remove stylus hack

This commit is contained in:
Gregory Eremin 2013-07-12 18:20:07 +07:00
parent 9dc851b95e
commit a3fbb46bfc
3 changed files with 16 additions and 15 deletions

View File

@ -1,11 +0,0 @@
module Sinatra::AssetPack
class StylusEngine < Engine
def css(str, options={})
Tilt.new("stylus", {:style => :compressed}) { str }.render
rescue LoadError
nil
end
end
Compressor.register :css, :stylus, StylusEngine
end

View File

@ -1,14 +1,27 @@
upstream pastemaster_unicorns {
server unix:/tmp/pastemaster.unicorn.sock fail_timeout=0;
}
server {
listen pm.localhots.xxx:80;
server_name pm.localhots.xxx;
root /home/www/apps/pastemaster/current;
client_max_body_size 10M;
keepalive_timeout 5;
location ^~ /public/ {
gzip_static on;
add_header Cache-Control public;
}
try_files $uri;
client_max_body_size 10M;
keepalive_timeout 10;
location / {
try_files $uri, @app;
}
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://pastemaster_unicorns;
}
}

View File

@ -19,7 +19,6 @@ require 'app/models/configuration'
require 'app/models/paste'
require 'config/initializers/configuration'
require 'config/initializers/database'
require 'config/initializers/sinatra_assetpack_stylus'
require 'lib/error_pages'
class Pastemaster < Sinatra::Application