Update needed
Closed this issue · 2 comments
aphive commented
Not sure how else to contact you as there is no way to leave a message at the site...
In the "Your final Nginx configuration should look like this:" file, the section you have:
location / {
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
}
That breaks forwarding from http -> https on WordPress so that only the homepage loads and nothing else; this needs to be:
location / {
try_files $uri $uri/ /index.php$is_args$args;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
}
it's missing the try_files $uri $uri/ /index.php$is_args$args;
line
llambiel commented
Thanks for your comment. This post outlines the configuration to serve a static site, as such this stanza isn't required. Of course Nginx config must be adapted depending on what is being served, but that is out of the scope of this blog post.
aphive commented
Thought I'd ask since it does not say for static sites only. Thanks for the update and clarification tho.