Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Alternate setup

Terje Larsen edited this page Jun 10, 2014 · 5 revisions

An alternative setup with dnsmasq and nginx.

dnsmasq

Installing the dnsmasq local resolver and configure it to consistently resolve .dev domains to 127.0.0.1.

  • Install dnsmasq

  • Configure /etc/resolv.conf

nameserver 127.0.0.1
  • Configure /etc/dnsmasq.conf
address=/dev/127.0.0.1
listen-address=127.0.0.1

resolv-file=/path/to/old/resolv.conf

nginx

Use nginx to proxy port 80 for dev domains to prax.

  • Install nginx

  • Modify /etc/nginx/nginx.conf to include:

http {
  # prax proxy
  include /etc/nginx/prax_proxy
}
  • Create /etc/nginx/prax_proxy
server {
    listen  80;
    server_name *.dev;

    location / {
      proxy_pass http://localhost:20559;
      proxy_redirect off;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
    }
}

Prax

Run prax like usually with prax start

Clone this wiki locally