Design
Design
Phaedra Solutions developed a cutting-edge Incident Tracking software for our client to revolutionize event management safety. With seamless logging of security, medical, site, and guest incidents, it offers real-time communication, media uploads, and staff notifications. The incident filters and automatic PDF reports also provide invaluable insights for proactive analysis and improvement.
An aspiring Esports Tournament platform, identified significant challenges for casual gamers venturing into competitive esports. These challenges included limited access to organized tournaments, a lack of visibility into skill progression, and difficulties in finding suitable scrimmage opportunities. To tackle these issues effectively our client collaborated with Phaedra Solutions to develop a user-friendly platform.
Phaedra Solutions created a cloud-based surveillance platform, enabling seamless integration with IP cameras and access control systems. The product features a fast interface accessible on both mobile devices and the web. By analyzing camera footage, AI helps businesses save time, gather critical security information, and make well-informed decisions.
Phaedra Solutions developed a cutting-edge Incident Tracking software for our client to revolutionize event management safety. With seamless logging of security, medical, site, and guest incidents, it offers real-time communication, media uploads, and staff notifications. The incident filters and automatic PDF reports also provide invaluable insights for proactive analysis and improvement.
An aspiring Esports Tournament platform, identified significant challenges for casual gamers venturing into competitive esports. These challenges included limited access to organized tournaments, a lack of visibility into skill progression, and difficulties in finding suitable scrimmage opportunities. To tackle these issues effectively our client collaborated with Phaedra Solutions to develop a user-friendly platform.
Phaedra Solutions created a cloud-based surveillance platform, enabling seamless integration with IP cameras and access control systems. The product features a fast interface accessible on both mobile devices and the web. By analyzing camera footage, AI helps businesses save time, gather critical security information, and make well-informed decisions.
Phaedra Solutions developed a cutting-edge Incident Tracking software for our client to revolutionize event management safety. With seamless logging of security, medical, site, and guest incidents, it offers real-time communication, media uploads, and staff notifications. The incident filters and automatic PDF reports also provide invaluable insights for proactive analysis and improvement.
An aspiring Esports Tournament platform, identified significant challenges for casual gamers venturing into competitive esports. These challenges included limited access to organized tournaments, a lack of visibility into skill progression, and difficulties in finding suitable scrimmage opportunities. To tackle these issues effectively our client collaborated with Phaedra Solutions to develop a user-friendly platform.
Phaedra Solutions created a cloud-based surveillance platform, enabling seamless integration with IP cameras and access control systems. The product features a fast interface accessible on both mobile devices and the web. By analyzing camera footage, AI helps businesses save time, gather critical security information, and make well-informed decisions.
This article mainly focuses on how to run the rails app in a subdirectory using NGINX. You will learn the reverse proxy of Nginx to serve your rails app.
It was needed because I came to meet a problem in which I want to run a specific part of a website in Ruby on Rails for a specific subdirectory. For example, my website is in PHP www.myphpwebsite.com/ and I want to run Ruby on rails site on the same url with different subdirectories like www.myphpwebsite.com/runthisinrubyonrails/. Whenever /runthisinrubyonrails/ detected, It should run on a different servers which is running ROR.
Rails give us a simple configuration for this purpose.
In config/application.rb file, add the following code:
module YourAPPName
class Application < Rails::Application
config.relative_url_root = '/runthisinrubyonrails'
# some other configuration code
end
end
In config.ru file:
map Rails::Application.config.relative_url_root || "/" do
run Rails.Application
end
we can check everything works fine with click route with /runthisinrubyonrails/ and simple by /.
for example, first asset was getting by www.myphpwebiste.com/assets/favicon.ico now you can try with www.myphpwebsite.com/runthisinrubyonrails/assets/favicon.ico. Both should work because when we have defined that in our config.ru file
Rails::Application.config.relative_url_root || "/"
if relative_url_root found then try with that if not then try with “/”
So we have the following configuration:
upstream unicorn_sock {
server your_sock_path;
}
server {
root <path_to_your_rails_app>/public;
location @proxy_rails_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn_sock;
}
location /runthisinrubyonrails/ {
alias <path_to_your_rails_app>/public/;
try_files $uri @proxy_rails_app;
}
try_files $uri @proxy_rails_app;
# some other configuration code
}