ysbaddaden / prax

Rack proxy server for development
http://ysbaddaden.github.io/prax/
Other
475 stars 49 forks source link

Prax Apache Page #130

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hey!

I followed the instructions on the website, but when I go to my_app_name_here.dev, it just returns the deafult It works! apache page.

I am running ubuntu 14.04 LTS. I tried chrome and firefox.

Any ideas? Thanks.

ysbaddaden commented 9 years ago

Please try http://myapp.dev:20559 and verify that it works. Maybe the port redirection rules haven't been applied.

BTW: Prax isn't "compatible" with regular HTTP servers like Apache or Nginx running on port 80. Once the port redirection rules are loaded, you won't be able to access them anymore. Unless you decide to use disable the port redirection rules, and use Prax on port :20559 instead.

ghost commented 9 years ago

@ysbaddaden Ah, ok, that makes sense.

Two more questions.

  1. Any idea how I can get rid of apache?
  2. Im getting this error in my prax.log and its saying Can't start application.
I, [2015-07-24T10:07:19.950085 #22344]  INFO -- : Spawning application 'pd3' [/home/nahtnam/Desktop/pd3]
E, [2015-07-24T10:07:39.561102 #22344] ERROR -- : ArgumentError: bad argument (expected URI object or URI string)
  /home/nahtnam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/common.rb:1234:in `URI'
  /opt/prax/lib/prax/request.rb:136:in `determine_host'
  /opt/prax/lib/prax/request.rb:75:in `host'
  /opt/prax/lib/prax/handler.rb:66:in `app_name'
  /opt/prax/lib/prax/handler.rb:17:in `handle'
  /opt/prax/lib/prax.rb:21:in `perform'
  /opt/prax/lib/prax/microworker.rb:84:in `block in work'
  /opt/prax/lib/prax/microworker.rb:77:in `each'
  /opt/prax/lib/prax/microworker.rb:77:in `work'
  /opt/prax/lib/prax/microworker.rb:63:in `block in spawn'
I, [2015-07-24T10:07:39.561236 #22344]  INFO -- : Respawning failed worker
ysbaddaden commented 9 years ago

It happens sometimes when it can't determine the host from either the Host: myapp.dev HTTP header or from the URI. You may want to run PRAX_DEBUG=1 prax start --foreground to debug a little bit more.

ghost commented 9 years ago

Getting this error:

https://gist.github.com/nahtnam/780b63f8c0b1bf0e59d6

My application runs fine if you run rails server or unicorn in the folder though.

ysbaddaden commented 9 years ago

Did you configure RVM as per the wiki page? https://github.com/ysbaddaden/prax/wiki/Ruby-Version-Managers#rvm

ysbaddaden commented 9 years ago

I'm afraid this is just the same than #129