ruby - Trying to reach rails app on shared server via subdomain, how? -


i trying run rails app (rails 4.0.0 , ruby 2.1.2p95) on shared server. app in "~/myapp" folder. had overcome problems runtime js. managed , able start app, without problems.

rails s -p 12001 => booting webrick => rails 4.0.0 application starting in development on http://0.0.0.0:12001 => run `rails server -h` more startup options => ctrl-c shutdown server [2014-05-16 09:35:33] info  webrick 1.3.1 [2014-05-16 09:35:33] info  ruby 2.1.2 (2014-05-08) [x86_64-linux] [2014-05-16 09:35:33] info  webrick::httpserver#start: pid=27965 port=12001 

i able reach app , see working, if add in ~/public_html/.htaccess file

rewriteengine on  rewritecond %{http_host} ^mydomain.com$ [or] rewritecond %{http_host} ^www.mydomain.com$ rewriterule ^(.*)$ "http://0.0.0.0:12001%{request_uri}" [p,qsa,l] 

however redirects whole domain rails app. how subdomain? eg. mysubdomain.mydomain.com

thanks :)


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -