I am using rail, passenger (both 3.0.5) and NGN on my production server as I have heard , The rail should show development errors such as Here is my nginx.conf: UPD : Do I have both the development and production app on the same PC in production or for Rail 3: delete your Or add If your app is not serving page and NGX does not have any visibility of static page, then it can not do the page you want. ActiveRecord :: RecordNotFound or public / 404.html or
public / 500.html code > Unknown action but this does not happen, I tried to delete the config.ru file and set rack_env or rails_env in nginx.conf but nothing helped.
worker_processes 1; Event {worker_connections 1024; } Http {passenger_root /home/makk/.rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.5; Passenger_ruby /home/makk/.rvm/bin/passenger_ruby; #tracer_rub / home / macak /. RVM / Weapar / RB19.2-P / RB; Include Mime.types; Default_type application / octet-stream; Send file on; Keepalive_timeout 65; Server {80; Server_name localhost; Location / {root / home / makk / projects / 1server / deployed / current / public; Index index.html index.htm; Active on passenger; Rack_Anv production; Recursive_error_pages; If (-f /home/makk/projects/1server/maintenance.html) {return 503; } Error_page 404 / 404.html; Error_page 500 502 504 / 500.html; Error_page 503 @ 503; } Place @ 503 {error_page 405 = / maintenance.html; # If found, serve fixed assets if (-f $ request_filename) {break; } Rewrite ^ (. *) $ / Mintration = brake; } Place ~ ^ (\ / phpmyadmin \ /) (. *) $ {Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_split_path_info ^ (\ / phpmyadmin \ /) (. *) $; Fastcgi_param SCRIPT_FILENAME / usr / share / phpmyadmin / $ fastcgi_path_info; Includes fastcgi_params; It seems that this question is a duplicate but there are no working suggestions.
local_request? Ignore
config.consider_all_requests_local = false (/config/environments/production.rb) due to the method. So one of the potential solutions is listed below (taken):
# config / initializers / local_request_override.rb module CustomRescue def local_request? What's wrong if Rails.env.production returns? || Rails.env.staging? Super End and Action Controller :: Base.Clash_Aval contains custom rescue ed
class ActionDispatch :: request DF local ? End of false end
root "server "Block so that server can get 5xx, 4XX error in handling pages using the Pulse-Ap Defined Area.
error_page instructions to the location block where the passenger is being used so that the error handler is required when the Rails app is in the public directory
public / 5xx .html .
Comments
Post a Comment