Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use Nginx as reverse proxy with Apache to cache static files, etc. I'm having an issue on a new install, that it's not passing on URIs to Apache. Basically I have a vBulletin forum, and I'm using vBSEO as the SEO proxy. The problem is it's generating 404s for every URL, except files that already exist.

share|improve this question
up vote 2 down vote accepted

Could you possibly give us the relevant portion of your nginx configuration? A.t.m. we cannot guess what's wrong (although one might: using 'localhost' when not in the hosts file, so not resolving to, wrong portnumber for apache, forgetting to add a host header, etc.). Normally, It'd be something like:

server {
    listen       80;

    # normally some checking here for static content which exists as file 
    # like images, js, etc, with a 'break', with at the end:

    location / {
        proxy_pass<portnumber apache is on>/;
        proxy_redirect     off;
        proxy_set_header   Host $host;
share|improve this answer

Well I traced it down to the SEO friendly plugin ( vBSEO ). It was producing links with .html extension and it seems nginx had it set for caching. Since those links didn't exist physically, it was producing the 404s.

share|improve this answer
Ah, you do know you can let nginx check for the existance of a file and resort to proxying if not found? – Wrikken Jun 15 '10 at 10:23
Well that was already added to the rules. The basic fact was that it was proxying all together because the extension was there. – Adrian A. Jun 18 '10 at 1:58

Your Answer


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.