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)

  1. sudo nano /etc/hosts
  2. add line 127.0.0.1 www.example.com
  3. 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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -