开发者

Point a local domain to localhost:3000

开发者 https://www.devze.com 2023-03-05 17:36 出处:网络
Hey, I would love to point a local domain to localhost:3000 or other ports on which I am running my Wubrick instances (for Rails)

Hey, I would love to point a local domain to localhost:3000 or other ports on which I am running my Wubrick instances (for Rails)

I can not find an apache2 config to point a local domain to these wubrick in开发者_Python百科stances (or simply localhost:3000). Can some one please help me with that?

Regards,

Nikhil Gupta


OK. Found the solution, as below:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName rails.new
    ServerAlias www.rails.new rails
    PassengerEnabled Off
    ProxyPass / http://127.0.0.1:3000/
    ProxyPassReverse / http://127.0.0.1:3000/
</VirtualHost>


If you want something even simpler and convenient you can use this project it does the same without the config stuff

https://github.com/cristianoliveira/ergo

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号