Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.07 KB | None | 0 0
  1. match '/404' => 'errors#error404', via: [:all]
  2. match '/500' => 'errors#error500', via: [:all]
  3.  
  4. def error404
  5. variables
  6. render status: :not_found
  7. end
  8.  
  9. def error500
  10. variables
  11. render status: :not_found
  12. end
  13.  
  14. ActionController::RoutingError (No route matches [GET] "/uslug"):
  15.  
  16.  
  17. actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  18. actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  19. railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
  20. railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
  21. activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  22. activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
  23. activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
  24. railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
  25. request_store (1.1.0) lib/request_store/middleware.rb:8:in `call'
  26. actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  27. rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  28. rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  29. activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  30. rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  31. actionpack (4.2.0) lib/action_dispatch/middleware/ssl.rb:24:in `call'
  32. railties (4.2.0) lib/rails/engine.rb:518:in `call'
  33. railties (4.2.0) lib/rails/application.rb:164:in `call'
  34. rack (1.6.4) lib/rack/tempfile_reaper.rb:15:in `call'
  35. rack (1.6.4) lib/rack/commonlogger.rb:33:in `call'
  36. rack (1.6.4) lib/rack/chunked.rb:54:in `call'
  37. rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  38. unicorn (5.0.1) lib/unicorn/http_server.rb:562:in `process_client'
  39. unicorn (5.0.1) lib/unicorn/http_server.rb:658:in `worker_loop'
  40. unicorn (5.0.1) lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
  41. unicorn (5.0.1) lib/unicorn/http_server.rb:132:in `start'
  42. unicorn (5.0.1) bin/unicorn:126:in `<top (required)>'
  43. /home/ubuntu/dir/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
  44. /home/ubuntu/dir/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'
  45.  
  46.  
  47. I, [2017-03-23T17:04:38.038484 #24020] INFO -- : Processing by
  48.  
  49. ErrorsController#error404 as HTML
  50.  
  51. I, [2017-03-23T17:04:38.038484 #24020] INFO -- : Processing by ErrorsController#error404 as HTML
  52. .....
  53. I, [2017-03-23T17:04:38.054016 #24020] INFO -- : Rendered errors/error404.html.haml within layouts/error (3.4ms)
  54. I, [2017-03-23T17:04:38.054140 #24020] INFO -- : Completed 500 Internal Server Error in 16ms
  55.  
  56. worker_processes 2;
  57.  
  58. events {
  59. worker_connections 1024;
  60. }
  61.  
  62.  
  63. http {
  64.  
  65.  
  66. include mime.types;
  67. default_type application/octet-stream;
  68.  
  69.  
  70. sendfile on;
  71. keepalive_timeout 65;
  72.  
  73. gzip on;
  74.  
  75. upstream unicorn {
  76. server unix:/tmp/unicorn.mysite.sock fail_timeout=0;
  77. }
  78.  
  79. server {
  80. listen 80;
  81. server_name mysite.ru;
  82. if ($host ~* ^www.(.*)$) {
  83. return 301 https://$1$request_uri;
  84. }
  85. root /home/ubuntu/dir/current/public;
  86. client_max_body_size 30M;
  87.  
  88. location ^~ /assets/ {
  89. gzip_static on;
  90. expires max;
  91. add_header Cache-Control public;
  92. }
  93.  
  94. try_files $uri/index.html $uri @unicorn;
  95. location @unicorn {
  96. proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for;
  97. proxy_set_header Host $http_host;
  98. proxy_set_header X-Real-IP $remote_addr;
  99. proxy_set_header CLIENT_IP $remote_addr;
  100. proxy_redirect off;
  101. proxy_set_header X-Forwarded-Proto https;
  102. proxy_pass http://unicorn;
  103. }
  104. }
  105.  
  106. server {
  107. listen 443 ssl;
  108. ssl on;
  109. ssl_certificate /home/ubuntu/dir/shared/config/server.crt;
  110. ssl_certificate_key /home/ubuntu/dir/shared/config/private.key;
  111. server_name mysite.ru;
  112. if ($host ~* ^www.(.*)$) {
  113. return 301 https://$1$request_uri;
  114. root /home/ubuntu/dir/current/public;
  115. client_max_body_size 30M;
  116.  
  117.  
  118. location ^~ /assets/ {
  119. gzip_static on;
  120. expires max;
  121. add_header Cache-Control public;
  122. }
  123.  
  124. try_files $uri/index.html $uri @unicorn;
  125. location @unicorn {
  126. proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for;
  127. proxy_set_header Host $http_host;
  128. proxy_set_header X-Real-IP $remote_addr;
  129. proxy_set_header CLIENT_IP $remote_addr;
  130. proxy_redirect off;
  131. proxy_set_header X-Forwarded-Proto https;
  132. proxy_pass http://unicorn;
  133. }
  134. }
  135. server {
  136. listen 80;
  137. server_name moskva.mysite.ru;
  138. return 301 https://mysite.ru$request_uri;
  139. }
  140.  
  141. server {
  142. listen 443 ssl;
  143. ssl on;
  144. ssl_certificate /home/ubuntu/dir/shared/config/server.crt;
  145. ssl_certificate_key /home/ubuntu/dir/shared/config/private.key;
  146. server_name moskva.mysite.ru;
  147. return 301 https://mysite.ru$request_uri;
  148. }
  149. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement