server { listen 80; ## listen for ipv4; this line is default and implied # listen [::]:80 default_server ipv6only=on; ## listen for ipv6 server_name blog.demo.taler.net; root /home/demo/merchant/examples/blog; index index.html; # Make site accessible from http://localhost/ location / { try_files $uri $uri/ =404; rewrite /taler/pay /pay.php; rewrite /taler/contract /generate_taler_contract.php; } location /fullfillment { rewrite /(.*) /$1.php; } location /articles { internal; } location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location /backend { rewrite /backend/(.*) /$1 break; proxy_pass http://127.0.0.1:9966; proxy_redirect off; proxy_set_header Host $host; } }