My Magento install keeps getting bombarded with traffic to /rss/catalog/notifystock which I read is a security issue in my current version of Magento.

This is causing to many concurrent sessions and therefore slowing the site right down or eventually taking it offline until they stop.

As a quick fix to combat this I wanted to deny all access to the /rssdirectory but alas my code doesn't snippet doesn't seem to have the desired affect and the url is still accessible.

I am using:

    location ~ /\rss* {
    # deny access to rss directory
    deny        all;

I though I may have incorrectly added this replacing rss with media for example does stop access to the media directory.

Any thoughs on why this could be and how to fix it?


  • Forgot Magento version running on debian – Alexander Nov 25 '16 at 19:59

As far as I recall the RSS doesn't have a leading slash. Index.phprss/catalog/notifystock

Try this

location ~ rss/catalog/(review|notifystock) {
  allow x.x.x.x;
  deny all;

  location ~ \.php$ {
    echo_exec @phpfpm;

Where x.x.x.x is your ip address

  • Thank you! That is exactly the code I was looking for :) – Alexander Nov 25 '16 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.