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

    Lighttpd нужна помощь

    Scheduled Pinned Locked Moved Russian
    44 Posts 5 Posters 20.7k 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.
    • W
      whitekasper
      last edited by

      выполнилась у меня команда /usr/local/www/lightsquid/lightparser.pl today
      но все равно при заходе на lightsquid Reports пишет ошибку 500 - Internal Server Error

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by

        @whitekasper:

        выполнилась у меня команда /usr/local/www/lightsquid/lightparser.pl today
        но все равно при заходе на lightsquid Reports пишет ошибку 500 - Internal Server Error

        Доступ к ГУИ сделайте HTTP/80 порт.

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • W
          whitekasper
          last edited by

          все!спасибо огромное.у меня все получилось после очистки файлов логов.и ошибка пропала и открывает статистику.
          еще раз большое спасибо за помощь. я новичок в этом деле.

          1 Reply Last reply Reply Quote 0
          • W
            whitekasper
            last edited by

            Теперь займусь присваиванием имен к IP адресам и уберу себя в статистике)

            1 Reply Last reply Reply Quote 0
            • W
              whitekasper
              last edited by

              подскажите.
              а возможно удалить все логи определенного ip (не спрятать, а очистить файл логов)

              странность наблюдается.добавлял в скип ip вчера и из отчетов убирался данный пользователь.потом удалил, сегодня снова добавил несколько ip и все равно в отчета они отображаются

              1 Reply Last reply Reply Quote 0
              • D
                dvserg
                last edited by

                @whitekasper:

                подскажите.
                а возможно удалить все логи определенного ip (не спрятать, а очистить файл логов)

                Вручную можно  :)

                SquidGuardDoc EN  RU Tutorial
                Localization ru_PFSense

                1 Reply Last reply Reply Quote 0
                • W
                  whitekasper
                  last edited by

                  @dvserg:

                  @whitekasper:

                  подскажите.
                  а возможно удалить все логи определенного ip (не спрятать, а очистить файл логов)

                  Вручную можно  :)

                  ок=)
                  а что по поводу игнора скипюзров?
                  файл скипюзер.cfg:

                  #sample comment
                  sampleuser
                  SKIP THIS IP
                  192.168.0.159
                  192.168.0.100
                  192.168.0.204

                  1 Reply Last reply Reply Quote 0
                  • W
                    whitekasper
                    last edited by

                    я что то не могу найти в каких конфигах или еще где прописано обращения к файлу skipuser.cfg

                    1 Reply Last reply Reply Quote 0
                    • D
                      dvserg
                      last edited by

                      @whitekasper:

                      я что то не могу найти в каких конфигах или еще где прописано обращения к файлу skipuser.cfg

                      Это должно быть в конфиге Лайтсквида, но в GUI этого не предусмотрено. Нужно править PHP скрипт чтобы добавлял туда нужную строку.

                      SquidGuardDoc EN  RU Tutorial
                      Localization ru_PFSense

                      1 Reply Last reply Reply Quote 0
                      • W
                        whitekasper
                        last edited by

                        так ведь все роаботало, ни чего не менял, кроме того что создал группы присвоил IP адресам имена.и произвел сначало добавления исключения(все заработало)потом удалил и уже при следущем добавление оно не сработало. выкладываю конфик lightsquid.cfg:

                        #!/usr/bin/perl

                        LightSquid Project © 2004-2008 Sergey Erokhin aka ESL

                        This program is free software; you can redistribute it and/or

                        modify it under the terms of the GNU General Public License

                        as published by the Free Software Foundation; either version 2

                        of the License, or (at your option) any later version.

                        detail see in gnugpl.txt

                        -------------------- GLOBAL VARIABLES  ---------------------------

                        #path to additional cfg files
                        $cfgpath = "/usr/local/etc/lightsquid";
                        #path to tpl folder
                        $tplpath = "/usr/local/www/lightsquid/tpl";
                        #path to lang folder
                        $langpath = "/usr/local/share/lightsquid/lang";
                        #path to report folder
                        $reportpath = "/var/lightsquid/report";
                        #path to access.log
                        $logpath = "/var/squid/log";
                        #path to ip2name folder
                        $ip2namepath = "/usr/local/libexec/lightsquid";

                        #path to lockfile ;-)
                        $lockpath            =$reportpath;

                        #if lockfile older $maxlocktime second, remove old lock file.
                        $maxlocktime     = 30*60;

                        #if 1 - lightparser generate some statistic
                        $debug              = 0; 
                        #if 1 - lightparser generate skip details, 2 ..., 3 ..., ....
                        $debug2              = 0;

                        -------------------- LightParser VARIABLES  ---------------------------

                        #squid log type
                        #if native squid format (default squid, see in doc) - must be 0
                        #if EmulateHttpdLog ON - set 1
                        #digit - for speed optimization
                        #try it set to 1 if parser generate warning

                        #see also month2dec below !!!!

                        $squidlogtype = 0;

                        #if you want skip some sites from stat, example our local www server
                        #WARNING !!!, don't leave this variable empty !!!
                        #example, if you want skip LOCAL site, put it here
                        #WARNING2
                        #use '' instead of "" !!!!!!!!!!!

                        #$skipurl            = 'zdd.com|192.168.1.|cnn.com';
                        $skipurl = "192.168.0.200";;

                        #define sobroutine file for convertion from IP into name
                        #if you want skip some ip from log - return "SKIP THIS IP" ;-)
                        #detail see in ip2name folder,

                        $ip2name = "ip";;

                        #use for convert from Text to Dec convertion if EmualteHttpdLog format !!!!
                        #fix it if need
                        %month2dec = ( Jan => 1, Feb => 2, Mar => 3, Apr => 4, May => 5,Jun => 6,
                                      Jul => 7, Aug => 8, Sep => 9, Oct => 10, Nov => 11,Dec => 12);

                        -------------------- Common (Parser & Web) VARIABLES  ----------------------

                        #create & use time report statistic (logsize = logsize*2) ;-))
                        $timereport          = 1;

                        -------------------- WEB VARIABLES  ----------------------------------------

                        #language
                        #see lang folder (avaible: bg,eng,fr,hu,it,pt_br,ru,sp)
                        $lang = "ru";;

                        #html template name
                        #see template folder tpl/$templatename/
                        $templatename = "base";;
                        #$templatename        ="ric";
                        #$templatename        ="base.css";

                        #define type of decimal output
                        #fine  123456789 -> 123,456,789
                        #class 123456789 ->      117.7 G
                        $DecOutType="class";

                        define delimiter for thousands (in fine mode)

                        = " " -> 12 345 678

                        = "," -> 12,345,678

                        = ""  ->  12345678

                        $decdelimiter        = " ";

                        #if you dont need Group mode, do =0
                        $showgrouplink     = 1;

                        #if not zero, groups look like "01. Group1", if zero - "Group1"
                        $showgroupid        = 1;

                        #if you dont need oversize report , do =0
                        $showoversizelink    = 1;

                        #show how many data user send to internet
                        $showputpost        = 0;
                        #if putpost higer this variable (in percent), highlight it
                        $putpostwarninglevel =15;

                        #use or not .realname files
                        #.realname contain pair userid -> Full User Name
                        $userealname        = 1;

                        #if url size exceed $bigfilelimit - add this file into report
                        $bigfilelimit        = 210241024;

                        #user maximum size per day limit (oversize)
                        $perusertrafficlimit = 1010241024;

                        weekend display mode

                        both - select sunday & monday

                        monday - only monday

                        $weekendmode="both";

                        #how many site show in TopSites report
                        $topsiteslimit      = 500;

                        #how many site show in user time report
                        $usertimelimit      = 200;

                        #if you want user traffic GRAPHIC report, set it in 1
                        #WARNING !!!, need libgd, GD.PM & other external modules !!!
                        #please run check-setup.pl for check library !!!!
                        $graphreport        = 0;

                        #higest value on graph report

                        for user month report (0.05*(...) = 50mb)

                        $graphmaxuser=0.05*(102410241024);

                        for all user month report (1.05*(...) = 1 Gb)

                        $graphmaxall =0.80*(102410241024);

                        #color scheme for GRAPHICs, avaible "orange","blue","green","yellow","brown","red"
                        $barcolor = "blue";;

                        #-------------------------------------------------------------------------- Group support

                        sub CreateGroupFile($) {
                          my $path=shift;

                        open Fi,"<$cfgpath/group.cfg";
                          open Fo,">$path/.group";
                          while (<fi>) {
                            print Fo $_;
                          }
                          close Fo;
                          close Fi;
                        }

                        #-------------------------------------------------------------------------- RealName support

                        sub CreateRealnameFile($) {
                          my $path=shift;

                        open Fi,"<$cfgpath/realname.cfg";
                          open Fo,">$path/.realname";
                          while (<fi>) {
                            print Fo $_;
                          }
                          close Fo;
                          close Fi;
                        }</fi></fi>

                        и еще был добавлен в "Skip url" адрес 192.168.0.200

                        1 Reply Last reply Reply Quote 0
                        • D
                          dvserg
                          last edited by

                          #define sobroutine file for convertion from IP into name
                          #if you want skip some ip from log - return "SKIP THIS IP"
                          #detail see in ip2name folder,

                          $ip2name="simple";

                          Потом нужно переформировать все отчеты заново - Кнопка Refresh_Full

                          SquidGuardDoc EN  RU Tutorial
                          Localization ru_PFSense

                          1 Reply Last reply Reply Quote 0
                          • W
                            whitekasper
                            last edited by

                            все получилось.Спасибо!

                            1 Reply Last reply Reply Quote 0
                            • W
                              whitekasper
                              last edited by

                              проблема со "skipuser.cfg" продолжается=(

                              1 Reply Last reply Reply Quote 0
                              • W
                                whitekasper
                                last edited by

                                @whitekasper:

                                проблема со "skipuser.cfg" продолжается=(

                                опишу действия по пунктам:
                                1)удаляю папку за сегодняшнее число в /var/lightsquid/report/20121016
                                2)добавляю в skipuser.cfg три IP-адреса:

                                #sample comment
                                sampleuser
                                SKIP THIS IP
                                192.168.0.159
                                192.168.0.100
                                192.168.0.204

                                3)через ssh выполняю "/usr/local/www/lightsquid/lightparser.pl"
                                4)захожу в проксирепорт(через браузр)нажмаю кнопку RefreshFull
                                5)открываю Report 16 число=>эти три IP-адреса все равно вылазят в отчетах
                                метод пробывал и IP и SIMPLE

                                1 Reply Last reply Reply Quote 0
                                • D
                                  dr.gopher
                                  last edited by

                                  @whitekasper:

                                  3)через ssh выполняю "/usr/local/www/lightsquid/lightparser.pl"
                                  4)захожу в проксирепорт(через браузр)нажмаю кнопку RefreshFull
                                  5)открываю Report 16 число=>эти три IP-адреса все равно вылазят в отчетах

                                  А не пробовали, добавить айпи и на следующий день посмотреть отчеты?
                                  Или вам приятно с бубном танцевать?

                                  FAQ PfSense 2.0

                                  И не забываем про Adblock дабы не видеть баннеров.

                                  И многое другое на www.thin.kiev.ua

                                  1 Reply Last reply Reply Quote 0
                                  • W
                                    whitekasper
                                    last edited by

                                    А не пробовали, добавить айпи и на следующий день посмотреть отчеты?
                                    Или вам приятно с бубном танцевать?

                                    как и следовало ожидать ожидание ни чего не изменило.

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      dr.gopher
                                      last edited by

                                      1)удаляю папку за сегодняшнее число в /var/lightsquid/report/20121016
                                      2)добавляю в skipuser.cfg три IP-адреса:

                                      #sample comment
                                      sampleuser
                                      SKIP THIS IP
                                      192.168.0.159
                                      192.168.0.100
                                      192.168.0.204

                                      cd /usr/local/www/lightsquid
                                      ./check-setup.pl

                                      видим:
                                      [2.0.1-RELEASE][root@pfsense.lan]/usr/local/www/lightsquid(14): ./check-setup.pl
                                      LightSquid Config Checker, © 2005-9 Sergey Erokhin GNU GPL

                                      LogPath  : /var/squid/log
                                      reportpath: /var/lightsquid/report
                                      Lang      : /usr/local/share/lightsquid/lang/ru
                                      Template  : /usr/local/www/lightsquid/tpl/base
                                      Ip2Name  : /usr/local/libexec/lightsquid/ip2name.ip

                                      WARNING: $skipurl variable contain unescaped '.' char !!!
                                      WARNING: if you use . as regular expression metacharacter please use '' instead "" and escape . via .
                                      WARNING: $skipurl now ->zzz.zzz<

                                      all check passed, now try access to cgi part in browser

                                      делаем:
                                      ./lightparser.pl

                                      4)  RefreshFull    Refresh new
                                      5)открываю Report 16 число=> и видим, что этих IP нет в отчетах

                                      FAQ PfSense 2.0

                                      И не забываем про Adblock дабы не видеть баннеров.

                                      И многое другое на www.thin.kiev.ua

                                      1 Reply Last reply Reply Quote 0
                                      • W
                                        whitekasper
                                        last edited by

                                        Сделал как в предыдущим посте - не получилось.
                                        Удалил лайтсквид, удалил вручную все конфиги.
                                        Установил все сделал по инструкции и все равно НЕ скрывает ip-адреса=))))

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          dr.gopher
                                          last edited by

                                          @whitekasper:

                                          Сделал как в предыдущим посте - не получилось.

                                          Может кэш браузера надо почистить.

                                          FAQ PfSense 2.0

                                          И не забываем про Adblock дабы не видеть баннеров.

                                          И многое другое на www.thin.kiev.ua

                                          1 Reply Last reply Reply Quote 0
                                          • W
                                            whitekasper
                                            last edited by

                                            Может кэш браузера надо почистить.

                                            да по привычке пользуюсь "Ctrl+F5"
                                            да и тестил на нескольких компах

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