I have been learning Ruby lately, and I want to upload a test web application to my server. But I can\'t figure out how to get it to run on my shared hosting.
My
firstly you have to start your application manualy or by script when the server is starting. Just do something like ruby hi.rb (as described on sinatra webpage it runs appication on the port 4567). Then you have two options. 1) You can access this application directly as: http://yourserver:4567/ or 2) you can use apache as a proxy.
If you want use apache as a proxy you have to use virtualhost servers. for example:
NameVirtualHost hi.server:80
<VirtualHost hi.server:80>
Servername hi.server
RewriteEngine On
<Proxy balancer://hi>
BalancerMember http://127.0.0.1:4567
</Proxy>
ProxyPass / balancer://hi/
ProxyPassReverse / balancer://hi/
</VirtualHost>
And if you have ie multiple cores you can run hi.rb more then once (each time on diferent port) and you just add new BalancerMember. You can also switch on apache cache using directive: CacheEnable mem /