Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just installed varnish on my site and got this problem... If I go to my site (http://techhamlet.com/) and click on the top link for the forum, the browser takes some tme and then takes me to http://techhamlet.com:8080/forum/ (Its broken!) It should go to http://techhamlet.com/forum/... Sometimes it works and sometimes it give this problem! How can I fix this?

I have Nginx installed in my Ubuntu server... Please help!

(I saw the same problem in serverfault but the answer says its a apache problem... In here im using Nginx!)

share|improve this question
1  
Try adding port_in_redirect off; to your nginx.conf. –  cyberx86 Mar 21 '12 at 18:48
    
@cyberx86 Thanks a lot my friend! It solved the problem! –  EApubs Mar 22 '12 at 2:39
    
Please mark cyberx86's answer as correct! –  3molo Mar 22 '12 at 8:52

1 Answer 1

up vote 2 down vote accepted

Adding port_in_redirect off; to your nginx.conf should fix the problem. As the name suggests, this directive will prevent Nginx from adding the port to the url when a request is redirected.

share|improve this answer

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.