Start rails server on a domain I mapped in my host file -
i want map:
www.example.com
in host file, how can start 'rails server' uses domain?
edit hosts file (instructions osx snow leopard)
sudo nano /etc/hosts
- add line
127.0.0.1 www.example.com
- refresh dns settings
sudo dscacheutil -flushcache
start rails on correct port
rails server
work on http://www.example.com:3000/. rid of :3000, start rails with: sudo rails server --port=80
(or rvmsudo
if using rvm)
for production use, might want see kevins answer.
Comments
Post a Comment