简体   繁体   中英

Rails webrick production port number

How can I permanently change my application port number in production?

I know I can specify the port number when starting the server rails s -p 3005 , but was wondering how to change it so that I dont have to specifiy the port number everytime I start up the app.

Don't use webrick in production.

It is only optimized for development purposes. Use something like thin , unicorn or passenger for example. You can find capistrano recipes to start or restart web servers when deploying the app.

This seems to answer your question even though the question references running in development. I tend to agree with modifying the config/boot.rb as per .

But, iltempo is correct that you should be using a different stack in production. I've had good luck with Passenger.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM