Nginx config, remove stylus hack
This commit is contained in:
		
							parent
							
								
									9dc851b95e
								
							
						
					
					
						commit
						a3fbb46bfc
					
				| @ -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 |  | ||||||
| @ -1,14 +1,27 @@ | |||||||
|  | upstream pastemaster_unicorns { | ||||||
|  |   server unix:/tmp/pastemaster.unicorn.sock fail_timeout=0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| server { | server { | ||||||
|   listen pm.localhots.xxx:80; |   listen pm.localhots.xxx:80; | ||||||
|   server_name pm.localhots.xxx; |   server_name pm.localhots.xxx; | ||||||
|   root /home/www/apps/pastemaster/current; |   root /home/www/apps/pastemaster/current; | ||||||
|  |   client_max_body_size 10M; | ||||||
|  |   keepalive_timeout 5; | ||||||
| 
 | 
 | ||||||
|   location ^~ /public/ { |   location ^~ /public/ { | ||||||
|     gzip_static on; |     gzip_static on; | ||||||
|     add_header Cache-Control public; |     add_header Cache-Control public; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   try_files $uri; |   location / { | ||||||
|   client_max_body_size 10M; |     try_files $uri, @app; | ||||||
|   keepalive_timeout 10; |   } | ||||||
|  | 
 | ||||||
|  |   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; | ||||||
|  |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -19,7 +19,6 @@ require 'app/models/configuration' | |||||||
| require 'app/models/paste' | require 'app/models/paste' | ||||||
| require 'config/initializers/configuration' | require 'config/initializers/configuration' | ||||||
| require 'config/initializers/database' | require 'config/initializers/database' | ||||||
| require 'config/initializers/sinatra_assetpack_stylus' |  | ||||||
| require 'lib/error_pages' | require 'lib/error_pages' | ||||||
| 
 | 
 | ||||||
| class Pastemaster < Sinatra::Application | class Pastemaster < Sinatra::Application | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user