I'm learning thin server, by now I can use thin start
to fire up the server, but the port is 3000, I should type the localhost:3000 in the browser to get the webpage.
I want to take off the 3000 port as we normally do with other site. So I set use the command thin -p 80 start
to use the default http port. But I got this error:
root@makserver:~/apps/videosite# thin --port 80 start >> Using rack adapter >> Thin web server (v1.2.7 codename No Hup) >> Maximum connections set to 1024 >> Listening on 0.0.0.0:80, CTRL+C to stop /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_tcp_server': no acceptor (RuntimeError) from /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_server' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/backends/tcp_server.rb:16:in `connect' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/backends/base.rb:49:in `block in start' from /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `call' from /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' from /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in `start' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/server.rb:156:in `start' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in `start' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:177:in `run_command' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:143:in `run!' from /usr/local/lib/ruby/gems/1.9.1/gems/thin-1.2.7/bin/thin:6:in `<top (required)>' from /usr/local/bin/thin:19:in `load' from /usr/local/bin/thin:19:in `<main>'
This indicates the port might be already in use.
Also, try running it with administrator privileges
sudo thin start -p 80
(Thanks to Tom Crinson for his blog article.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With