How to limit download speed for a website's files

Follow

Comments

4 comments

  • Avatar
    Gonzalo Besoain

    Thanks for the article, but It doesn't work in my case. 

    Is there any other pre-requisite beside to disable Nginx?

  • Avatar
    Konstantin Annikov

    @Gonzalo, 

    Thank you for the question. We have reworked the article to be able to do the same with nginx directives. 

  • Avatar
    Gonzalo Besoain (Edited )

    Thank you very much Konstantin!

    Another question, how can this be implemented in a subdomain? I've tried but it doesn't seems to work (Apache) or throw me an error in nginx

    If I enable nginx and made the config changes in the subdomain config, Plesk don't allow me and gave me this error...

    ....New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/subdomain.domain.com

    My config in the subdomain was:

    location /{
        limit_rate 350k;
    }

     

  • Avatar
    Konstantin Annikov

    @Gonzalo, 

    If it is needed to add limit_rate to "/" location, you should not define the location, as it is already defined. 

    So, you can just type in 

     limit_rate 350k;

    Into Additional nginx directives

Please sign in to leave a comment.

Have more questions? Submit a request