getgrav / grav-plugin-feed

Grav Feed Plugin
https://getgrav.org
MIT License
16 stars 11 forks source link

Enabled but getting 404 #31

Closed techmagus closed 5 years ago

techmagus commented 6 years ago

Hi,

I have the plugin enabled and settings are good, but I am getting 404 when opening .atom and .rss.

Here are the links: https://verses.space/blog https://verses.space/blog.atom https://verses.space/blog.rss

Did I miss some setup step?

Thank you.

trst commented 5 years ago

I have a similar issue. Only the JSON feed is accessible, but the regular RSS and ATOM feeds retrieve a 404.

Is it possible that for whatever reason the plugin is only creating one or the other? E.g., XML OR JSON but not both.

rhukster commented 5 years ago

Pretty sure this is related to your Nginx configuration. It's not passing the .rss or .atom requests to the index.php file. Can you paste me your nginx config???

trst commented 5 years ago

Doh! You were right. More embarrassing I'd already solved it.

Make sure that your nginx config isn't slurping the RSS or ATOM feeds into cache:

# Cache static files
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ {
  add_header "Access-Control-Allow-Origin" "*";
  access_log off;
  log_not_found off;
  expires max;
}

Change to:

# Cache static files
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf)$ {
  add_header "Access-Control-Allow-Origin" "*";
  access_log off;
  log_not_found off;
  expires max;
}
rhukster commented 5 years ago

documented in README.md