Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Sarge with squid new Log Pages Denied by SquidGuard?

    Scheduled Pinned Locked Moved Cache/Proxy
    3 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      killmasta93
      last edited by

      Hi,
      So i was tweaking some stuff on squid and never really realized the option that shows

      Log Pages Denied by SquidGuard

      But in bold letters i see

      Hint: You MUST remove extra spaces in the above iframe HTML tags.

      so the code is this

      $sge_prefix = (preg_match("/\?/", $cl['u']) ? "&" : "?");
      $str[] = '< iframe > src="'. $cl['u'] . $sge_prefix . 'sgr=ACCESSDENIED" width="1" height="1" > < /iframe >';
      

      but as the hint says remove extra spaces?

      so something like this?

      $sge_prefix = (preg_match("/\?/", $cl['u']) ? "&" : "?");
      $str[] = ' <iframe>src="'. $cl['u'] . $sge_prefix . 'sgr=ACCESSDENIED" width="1" height="1" ></iframe> ';
      

      and then edit the sgerror.php located /usr/local/www edit the file adding the line of code not really sure where to put it in?

      Thank you

      Tutorials:

      https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

      1 Reply Last reply Reply Quote 0
      • A
        andersons
        last edited by

        Hello. Edit the file sgerror.php. I put the code in the end just after the last } (line 291 in my file):
        It looks like:

        }
        $sge_prefix = (preg_match("/?/", $cl['u']) ? "&" : "?");
        $str[] = '< iframe > src="'. $cl['u'] . $sge_prefix . 'sgr=ACCESSDENIED" width="1" height="1" > < /iframe >';
        ?>

        1 Reply Last reply Reply Quote 0
        • K
          killmasta93
          last edited by

          Hey thanks for the reply

          So this is what i have see picture

          But when i go to sarg reports and go to the denied pages I dont see the pages that have been blocked I tried going to sites blocked but nothing :(

          Thank you

          Clipboarder.2016.02.02.png
          Clipboarder.2016.02.02.png_thumb

          Tutorials:

          https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.