NGINX rewrite port 8080

  • Posted July 30, 2013

I’m trying to run an instance of news.arc (that’s the HackerNews board), but I can’t quite decode if I’m supposed to use a rewrite rule, a redirect, a proxy_pass, an upstream, or some sort of magical mystical incantation.

I’m pretty sure that SETT is being reverse proxied through Nginx the same way, and I’d appreciate any help offered.

Here’s where it’s currently running:

But I’d like it to be at

Here’s the text from my sites-available/www file. What’s the right config?

upstream news {
server weight=5;
server max_fails=3 fail_timeout=30s;

server {

location / {

location /news/ {
rewrite /news/ (.*) /$1 break;
rewrite ^/news$ /news/ permanent;
proxy_pass http://localhost:8080/;
proxy_redirect / /news/;

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Is everything running locally? Are you trying to have two applications on one domain? I’m not sure how you have everything set up as it’s a bit unclear.