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.
-
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 127.0.0.1, wrong portnumber for apache, forgetting to add a host header, etc.). Normally, It'd be something like:
server { listen 80; server_name www.example.com; # 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 http://127.0.0.1:<portnumber apache is on>/; proxy_redirect off; proxy_set_header Host $host; } }From Wrikken -
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.
Wrikken : Ah, you do know you can let nginx check for the existance of a file and resort to proxying if not found?Adrian A. : Well that was already added to the rules. The basic fact was that it was proxying all together because the extension was there.From Adrian A.
0 comments:
Post a Comment