typicode / katon

(use hotel instead)
https://github.com/typicode/hotel
MIT License
683 stars 28 forks source link

Apache fighting with Katon #59

Closed brandonbuttars closed 9 years ago

brandonbuttars commented 9 years ago

My Apache configuration on Yosemite starts Apache automatically when my computer boots up. I had been wrestling with Katon and it would work one minute but not another. I remembered that Apache was running. Once I stopped Apache, Katon seemed to run like a champ.

Wondering if anyone else can confirm the issue. Just thought I'd give some insight since there may be a lot os OS X users whose Apache could be causing some issues. It may be good to put "Stop Apache" in set up instructions if this is indeed an issue.

typicode commented 9 years ago

Hi Brandon,

Can't make tests right now, but I've added a comment in the install section about it. It's quite possible since both are using port 80.

brandonbuttars commented 9 years ago

K. So it's most likely a port issue as opposed to an Apache problem. I'll check that specifically.

typicode commented 9 years ago

Maybe that can help. When computers boots up, katon creates a firewall rule that maps port 80 to port 31000 (katon port).

typicode commented 9 years ago

katon uses the same technique as Pow. There's some informations here: https://github.com/basecamp/pow/wiki/Running-Pow-with-Apache

But right now, you can't change katon configuration.

Just out of curiosity, what are you using Apache for?

brandonbuttars commented 9 years ago

I do a lot with WordPress and Drupal and other Open Source projects that include MySQL and PHP. Just makes it super easy to develop locally running an Apache server since it's built into OS X.

typicode commented 9 years ago

Oh I see. Not an Apache or PHP expert, sorry for the questions, but would there be a way to tell Apache to listen on another port from the command line?

$ katon add 'some-apache-script.sh $PORT`
brandonbuttars commented 9 years ago

You can change the default port in the httpd.conf file, but I was trying to avoid that. Is there a way to restrict Katon from using specific ports?

typicode commented 9 years ago

Hmm, you can run sudo katon uninstall this will make sure that a firewall rule is not added on port 80. Run also katon start to be sure that katon is running on port 31000.

Basically, katon install sets system configuration (firewall, local .ka domain) and katon start starts daemon as a simple user.

Then you can use katon this way:

$ katon add 'command' --name app
$ curl -H 'Host: app.ka' http://localhost:31000 

Is it possible to tell Apache to redirect all requests to *.ka to localhost:31000?

typicode commented 9 years ago

Just an update, I've created hotel. It works differently and doesn't interact with port 80. It can be an alternative to katon if you need port 80.

brandonbuttars commented 9 years ago

Cool.  I’ll check it out.  Thanks.

--  Brandon Buttars brandonbuttars@gmail.com 435-764-4574

On July 2, 2015 at 2:17:01 AM, typicode (notifications@github.com) wrote:

Just an update, I've created hotel. It works differently and doesn't interact with port 80. It can be an alternative to katon if you need port 80.

— Reply to this email directly or view it on GitHub.