How to run rails s -p80 on 80 port?

后端 未结 5 1157
长情又很酷
长情又很酷 2020-12-07 07:36

By default,

 rails s #running on 3000 port

Now I want to run it on port 80. So I tried:

 sudo rails -s -p80
5条回答
  •  醉酒成梦
    2020-12-07 08:23

    If you are using RVM, and you did the default setup, then you shouldn't use sudo.

    Just:

    mlzboy@mlzboy-MacBook ~/my/b2c2 $ rails server -p 80
    

    However 80 is a privileged port, so you need to run as root, and you will have follow the instructions for Multi-User installation of RVM.

提交回复
热议问题