Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Some time ago I had installed Pow to run my sinatra apps. Now today I wanted to use my Mac's built in web sharing to test an html file as rendered on my iPod Touch.

I browsed to 10.0.1.20/~francesco/ which is my personal site folder and recived a 404 error.

I think this error is because of the Pow installation. In fact if I point to 10.0.1.20 it tells me that Pow is running.

How can I tell Pow to run only if I point to my_app.dev or othermyapp.dev? Is this a way to correct this issue?

share|improve this question
    
Thanks for the flags, but I'm inclined to let this ride. Programming is clearly off topic, but configuring a service seems more like a user / admin issue that we like to see here in scope. –  bmike Jul 5 '12 at 17:48
add comment

2 Answers

If you follow these instructions it should allow you to view localhost running on Apache and any domain ending with .dev to use pow.

If you have trouble with it make sure you restart Apache when you change any settings and you may have to wait up to 5 mins for the DNS to fix themselves. There is a way to force kill the nameservers but I can't remember the command.

share|improve this answer
add comment

Not really the solution you asked for, but here's one way to work round it without spending a lot of time messing with config's, it also has the advantage of being less prone to breaking after updates and upgrades.

2.1.3 The Default Virtual Host
If you attempt to access a domain that Pow doesn't understand, like http://localhost/, you'll see a page letting you know that Pow is installed and working correctly, with instructions on how to set up an application.

You can override this behavior to serve all requests for unhandled domains with a particular Rack application. Create a symlink in ~/.pow named default and point it to the application of your choice.

Add to that the information from here:

2.4 Serving Static Files
Pow automatically serves static files in the public directory of your application. It's possible to serve a completely static site without a config.ru file as long as it has a public directory.

And that should create a default Rack app that can serve up content based on IP address (no host headers)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.