Skip to content

Instantly share code, notes, and snippets.

@teamon
Created July 28, 2011 19:11
Show Gist options
  • Save teamon/1112295 to your computer and use it in GitHub Desktop.
Save teamon/1112295 to your computer and use it in GitHub Desktop.
Pow + nginx configuration aka give me back my 80 port!
# Install pow
$ curl get.pow.cx | sh
# Install powder
$ gem install powder
# See that firewall is fucked
$ sudo ipfw show
00100 0 0 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in <- THIS ONE!!!
65535 81005 28684067 allow ip from any to any
# Disable it
$ powder down
# See? It's gone!
$ sudo ipfw show
65535 81005 28684067 allow ip from any to any
# Required nginx configuration
server {
listen 80;
server_name *.dev;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_pass http://localhost:20559; # The real pow port
}
}
@iAladdin
Copy link

Great. Thanks!

@ashleyconnor
Copy link

Thanks!

@naillizard
Copy link

Not working on OSX Mountain Lion pow 0.4.1 and nginx 1.4.2, it keeps redirecting to pow, I have to disable pow to get to nginx and enable it if working on rails projects..

@Vetal4eg
Copy link

@diegotdai, try this way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment