Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- match '/404' => 'errors#error404', via: [:all]
- match '/500' => 'errors#error500', via: [:all]
- def error404
- variables
- render status: :not_found
- end
- def error500
- variables
- render status: :not_found
- end
- ActionController::RoutingError (No route matches [GET] "/uslug"):
- actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
- actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
- railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
- railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
- activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
- activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
- activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
- railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
- request_store (1.1.0) lib/request_store/middleware.rb:8:in `call'
- actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
- rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
- rack (1.6.4) lib/rack/runtime.rb:18:in `call'
- activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
- rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
- actionpack (4.2.0) lib/action_dispatch/middleware/ssl.rb:24:in `call'
- railties (4.2.0) lib/rails/engine.rb:518:in `call'
- railties (4.2.0) lib/rails/application.rb:164:in `call'
- rack (1.6.4) lib/rack/tempfile_reaper.rb:15:in `call'
- rack (1.6.4) lib/rack/commonlogger.rb:33:in `call'
- rack (1.6.4) lib/rack/chunked.rb:54:in `call'
- rack (1.6.4) lib/rack/content_length.rb:15:in `call'
- unicorn (5.0.1) lib/unicorn/http_server.rb:562:in `process_client'
- unicorn (5.0.1) lib/unicorn/http_server.rb:658:in `worker_loop'
- unicorn (5.0.1) lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
- unicorn (5.0.1) lib/unicorn/http_server.rb:132:in `start'
- unicorn (5.0.1) bin/unicorn:126:in `<top (required)>'
- /home/ubuntu/dir/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
- /home/ubuntu/dir/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'
- I, [2017-03-23T17:04:38.038484 #24020] INFO -- : Processing by
- ErrorsController#error404 as HTML
- I, [2017-03-23T17:04:38.038484 #24020] INFO -- : Processing by ErrorsController#error404 as HTML
- .....
- I, [2017-03-23T17:04:38.054016 #24020] INFO -- : Rendered errors/error404.html.haml within layouts/error (3.4ms)
- I, [2017-03-23T17:04:38.054140 #24020] INFO -- : Completed 500 Internal Server Error in 16ms
- worker_processes 2;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- gzip on;
- upstream unicorn {
- server unix:/tmp/unicorn.mysite.sock fail_timeout=0;
- }
- server {
- listen 80;
- server_name mysite.ru;
- if ($host ~* ^www.(.*)$) {
- return 301 https://$1$request_uri;
- }
- root /home/ubuntu/dir/current/public;
- client_max_body_size 30M;
- location ^~ /assets/ {
- gzip_static on;
- expires max;
- add_header Cache-Control public;
- }
- try_files $uri/index.html $uri @unicorn;
- location @unicorn {
- proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header CLIENT_IP $remote_addr;
- proxy_redirect off;
- proxy_set_header X-Forwarded-Proto https;
- proxy_pass http://unicorn;
- }
- }
- server {
- listen 443 ssl;
- ssl on;
- ssl_certificate /home/ubuntu/dir/shared/config/server.crt;
- ssl_certificate_key /home/ubuntu/dir/shared/config/private.key;
- server_name mysite.ru;
- if ($host ~* ^www.(.*)$) {
- return 301 https://$1$request_uri;
- root /home/ubuntu/dir/current/public;
- client_max_body_size 30M;
- location ^~ /assets/ {
- gzip_static on;
- expires max;
- add_header Cache-Control public;
- }
- try_files $uri/index.html $uri @unicorn;
- location @unicorn {
- proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header CLIENT_IP $remote_addr;
- proxy_redirect off;
- proxy_set_header X-Forwarded-Proto https;
- proxy_pass http://unicorn;
- }
- }
- server {
- listen 80;
- server_name moskva.mysite.ru;
- return 301 https://mysite.ru$request_uri;
- }
- server {
- listen 443 ssl;
- ssl on;
- ssl_certificate /home/ubuntu/dir/shared/config/server.crt;
- ssl_certificate_key /home/ubuntu/dir/shared/config/private.key;
- server_name moskva.mysite.ru;
- return 301 https://mysite.ru$request_uri;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement