I have a domain on namecheap and I created a subdomain for the staging env, nevertheless the point of me doing that because I want to have this domain to point to one page in my rails app but I'm not sure how to do that. so I went to staging and I nano the file in sites-enabled directive and added this block:
server {
listen 8880;
server_name staging.my_domain_name.com;
access_log /var/www/my_app_name/current/log/access.log;
error_log /var/www/my_app_name/current/log/error.log;
root /var/www/my_app_name/current/public/;
passenger_ruby /home/deploy/.rbenv/versions/2.1.0/bin/ruby;
passenger_enabled on;
rails_env staging;
rails_spawn_method smart-lv2;
passenger_min_instances 1;
# Maintenance
error_page 404 /404.html;
error_page 403 /404.html;
location = /404.html {
internal;
}
}
so for the root I tried to change the path to my view path
/var/www/my_app_name/current/app/views/pages/page_name.html.erb;
I also tried to add the link as it is I'm not sure how to do this and I'm still new in DevOps
I tried to look for how to make Nginx point to one page in my rails app
Note: It listens to 8880 because i have varnish server who listen to port 80
Any help would be highly appreciated. Thanks.