Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost on homepage #14

Closed
halcyonCorsair opened this issue Nov 29, 2011 · 3 comments
Closed

Boost on homepage #14

halcyonCorsair opened this issue Nov 29, 2011 · 3 comments
Assignees

Comments

@halcyonCorsair
Copy link

Homepage: eg.
site.com/home will get boosted
site.com won't get boosted

I believe it is because of the internal redirect caused by:
index index.php;
and
locations = /index.php
getting matched before anything, so the cache never gets checked.

I can't think of a good workaround for this however...

@perusio
Copy link
Owner

perusio commented Dec 3, 2011

Hmm, I'm going to have a look on that. I haven't tried it, but it seems to make sense. Let me see. Untested. Try adding:

map $request_uri $is_index {
    default 0;
    /index.php 1;
    / 1;
}

in nginx.conf and then at the / location use:

error_page 418 =200 @cache;

if ($is_index) {
    return 418;
}

Let me know how it went. I'm a little pressed for time with a project deadline right now. After monday I'll address this issue more carefully.

Thanks,
António

@ghost ghost assigned perusio Dec 3, 2011
@perusio
Copy link
Owner

perusio commented Dec 3, 2011

Ah yes. Comment out this part of the config to try the above workaround:

location = / {
    error_page 404 =200 /index.html;
}

@halcyonCorsair
Copy link
Author

Thanks for that. We used a slightly different workaround for a bit before ripping out boost completely in favour of Varnish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants