Apache open custom page depending on ip

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
0
down vote

favorite












I have a apache. There is a config file:



 <VirtualHost 0.0.0.0:80>
DocumentRoot /var/www/html
LogFormat "%X-Forwarded-Fori %b %%d/%m/%yt" bandwidth
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
CustomLog /var/log/httpd/bandwidth.log bandwidth
</VirtualHost>


And i have a text file, where stored ip-s, and that list can be modified in time from script file, which monitoring bandwidth by ip, and if ip reached a limit , the monitoring service add ip in text file.
How can i redirect request to static "limit.php" file, when some ip reach limit.



The monitoring service is a script in bash , which calculate bandwidth from /var/log/httpd/bandwidth.log file.







share|improve this question

























    up vote
    0
    down vote

    favorite












    I have a apache. There is a config file:



     <VirtualHost 0.0.0.0:80>
    DocumentRoot /var/www/html
    LogFormat "%X-Forwarded-Fori %b %%d/%m/%yt" bandwidth
    ErrorLog /var/log/httpd/error.log
    CustomLog /var/log/httpd/access.log combined
    CustomLog /var/log/httpd/bandwidth.log bandwidth
    </VirtualHost>


    And i have a text file, where stored ip-s, and that list can be modified in time from script file, which monitoring bandwidth by ip, and if ip reached a limit , the monitoring service add ip in text file.
    How can i redirect request to static "limit.php" file, when some ip reach limit.



    The monitoring service is a script in bash , which calculate bandwidth from /var/log/httpd/bandwidth.log file.







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a apache. There is a config file:



       <VirtualHost 0.0.0.0:80>
      DocumentRoot /var/www/html
      LogFormat "%X-Forwarded-Fori %b %%d/%m/%yt" bandwidth
      ErrorLog /var/log/httpd/error.log
      CustomLog /var/log/httpd/access.log combined
      CustomLog /var/log/httpd/bandwidth.log bandwidth
      </VirtualHost>


      And i have a text file, where stored ip-s, and that list can be modified in time from script file, which monitoring bandwidth by ip, and if ip reached a limit , the monitoring service add ip in text file.
      How can i redirect request to static "limit.php" file, when some ip reach limit.



      The monitoring service is a script in bash , which calculate bandwidth from /var/log/httpd/bandwidth.log file.







      share|improve this question











      I have a apache. There is a config file:



       <VirtualHost 0.0.0.0:80>
      DocumentRoot /var/www/html
      LogFormat "%X-Forwarded-Fori %b %%d/%m/%yt" bandwidth
      ErrorLog /var/log/httpd/error.log
      CustomLog /var/log/httpd/access.log combined
      CustomLog /var/log/httpd/bandwidth.log bandwidth
      </VirtualHost>


      And i have a text file, where stored ip-s, and that list can be modified in time from script file, which monitoring bandwidth by ip, and if ip reached a limit , the monitoring service add ip in text file.
      How can i redirect request to static "limit.php" file, when some ip reach limit.



      The monitoring service is a script in bash , which calculate bandwidth from /var/log/httpd/bandwidth.log file.









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jul 27 at 12:19









      Gev Hakobyan

      11




      11




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You can use RewriteMap and then write a RewriteCond that meet your interests.






          share|improve this answer





















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f458829%2fapache-open-custom-page-depending-on-ip%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            You can use RewriteMap and then write a RewriteCond that meet your interests.






            share|improve this answer

























              up vote
              0
              down vote













              You can use RewriteMap and then write a RewriteCond that meet your interests.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                You can use RewriteMap and then write a RewriteCond that meet your interests.






                share|improve this answer













                You can use RewriteMap and then write a RewriteCond that meet your interests.







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Jul 27 at 13:45









                Lorenzo Garuti

                1




                1






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f458829%2fapache-open-custom-page-depending-on-ip%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay