Skip to main content

How to limit max downloads in apache?

Comments

4 comments

  • rpvw
    There are probably many ways of achieving this ...... here is one way I would explore if I were trying to solve the problem..... Use PHP to create session files for each started download, that were then stored or enumerated in a database (MySQL or SQLite - whatever rocks your world), and counted before allowing a new session (file download) to be started - if the number of sessions is over the set limit -> display "too many users" error. Don't forget to delete the session entry when the download finishes. Use your favourite search engine to look for "PHP how to count downloads" for ideas and code examples.
    0
  • cPanelMichael
    Hello @Stouf, Let us know how it turns out. Thanks!
    0
  • Stouf
    What php scripts can do this?
    0
  • cPanelMichael
    Hello @Stouf, I don't have a specific PHP script to recommend, but there are some limits you can configure for Apache in WHM >> Apache Configuration >> Global Configuration. For instance, Max Request Workers is a value you could adjust: [QUOTE] This directive sets the limit on the number of simultaneous requests that will be served. This interface allows up to the value of the ServerLimit setting. This used to be called 'MaxClients' prior to Apache 2.4.
    Thank you.
    0

Please sign in to leave a comment.