Hey guys, new to rails, but I have found out how to create an app now through the shell but to create an app using rails appname
would give me a url of http://url.com/appname/ but I want my app, to be within the route if you understand me, so it's just http://url.com/login/ or /signup or /play so on?
So does anyone have any idea开发者_开发百科s how to do this, or why you can't or I shouldn't? Anything really, thanks guys!
if you use passenger and apache, firstly in your apache conf file
<VirtualHost *:80>
ServerName myapp.local
DocumentRoot "/home/davit/myapp/public"
</VirtualHost>
DocumentRoot should be point to your app' s public folder.
And in public folder create a .htaccess file and write this:
PassengerEnabled on
RailsEnv development
Rails application is stored in some directory like appname
but it doesn't appear in url path. In general you should configure your server (Apache, nginx, ...) to point to public
folder in rails application. The only thing to do is to configure your server properly.
It depends on your hosting provider, with dreamhost, which I use, its part of the tools they provide to configure where do I want the application to be.
If you have to configure things yourself, you can still write your alias configuration or whatever your server uses to map to your rails application public/ folder.
精彩评论