View previous topic :: View next topic |
Author |
Message |
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Fri Apr 13, 2012 6:05 pm Post subject: Start squid proxy |
|
|
Any specific user Squid needs to be started as? Will not start as root and creating squid (effective user) user also does not allow starting
This is a new 1.6.5 native install
/etc/rc.d/rc.squid: Permission denied when using webmin to start and after init the cache. - thxs |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Fri Apr 13, 2012 6:35 pm Post subject: |
|
|
never mind - rc.squid was not set to execute. /etc/rc.d/rc.squid
Should this not already be set if you have selected to install squid? |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Fri Apr 13, 2012 7:41 pm Post subject: |
|
|
good catch! Also, clamd and dansguardian were not executable. On my download. |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Fri Apr 13, 2012 9:18 pm Post subject: |
|
|
yep - same here. |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Fri Apr 13, 2012 10:01 pm Post subject: |
|
|
squid and dansguardian have entries in /etc/rc.d/rc.M, so if they are executable they will start by default, and since proxy server and content filtering isn't a common setup I left them out by default.
They need further setup anyway, so if you are going to use them you will have to make them executable too.
As for rc.clamd it's a left over of my slackbuild, we use rc.clamav
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Ansy Member
Joined: 24 Feb 2011 Posts: 42 Location: RUSSIA
|
Posted: Mon Sep 24, 2012 7:55 am Post subject: Is Squid url_regex broken? |
|
|
I've made a proxyarp-server for redirecting HTTP to transparent proxy in private organisation. Old (4 years in production) Slackware-based server does it just fine for now. SMS1.6.6-based one with the same Squid options transparently proxying too... but doesn't do url_regex and dstdom_regex filtering at all Nothing in logs -- no DENIED items, no errors. Code: | acl gam dstdom_regex www.gambling.com
acl shit url_regex sex\.com
acl ournet src 192.168.253.0/24
http_access allow ournet !shit !gam | Upgrading via slapt-get doesn't help.
Anybody who are using Squid, please test url_regex acl, is it really broken now? _________________ In CODe we TRUST! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Sep 24, 2012 3:15 pm Post subject: |
|
|
I just test 1SMS-1.6.6, and I don't seem to have a problem with url_regex, I get "Access Denied"
Have you copy configuration from old slackware server to SMS?
Which version of squid was running in the old server?
Can you post your squid.conf?
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Ansy Member
Joined: 24 Feb 2011 Posts: 42 Location: RUSSIA
|
Posted: Thu Sep 27, 2012 7:51 am Post subject: Squid url_regex works! |
|
|
Well, my fault, sorry...
I've found working uncommented http_access allow localnet just before my own ACLs. Commenting it solves the problem, because localnet defined much upper as all RFC1918, and my addresses requests passed through without any url_regex filtering.
Now I'm trying to setup lightsquid, but that's another sad story... GD.pm Perl module doesn't pass tests _________________ In CODe we TRUST! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Thu Sep 27, 2012 10:11 am Post subject: |
|
|
I rebuilt perl-modules package to include GD, GD::Graph and GDTextUtils.
I'm syncing repos now, soon you will be able to upgrade the package...
lightsquid it's about 60KB so I might add it as a package in SMS...
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Ansy Member
Joined: 24 Feb 2011 Posts: 42 Location: RUSSIA
|
Posted: Fri Sep 28, 2012 12:26 pm Post subject: lightsquid |
|
|
Great many thanks, gerasimos_h!
But for now I can't confirm this trouble solved, because of after some slapt-gets my lightsquid installation complies: Quote: | no: GD.PM found, please install or set $graphreport=0 to disable | and manually GD making still prints: Code: | root@sms:/tmp/GD-2.46# perl Makefile.PL
Notice: Type perl Makefile.PL -h for command-line option summary.
Configuring for libgd version 2.0.35.
Checking for stray libgd header files...
** WARNING: found gd.h header file in /usr/X11R6/includegd.h, but it is expected at /usr/include/gd.h. This may cause compile errors! **
** Possible problems found **
Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from: /usr
Checking if your kit is complete...
Looks good
Writing Makefile for GD
root@sms:/tmp/GD-2.46# make
/usr/bin/perl5.16.1 GD/Image.pm.PLS GD/Image.pm
Extracting Image.pm (with variable substitutions)
cp GD/Polyline.pm blib/lib/GD/Polyline.pm
cp qd.pl blib/lib/qd.pl
cp GD/Image.pm blib/lib/GD/Image.pm
cp GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
cp GD/Simple.pm blib/lib/GD/Simple.pm
cp GD/Polygon.pm blib/lib/GD/Polygon.pm
cp GD/Group.pm blib/lib/GD/Group.pm
/usr/bin/perl5.16.1 /usr/lib/perl5/ExtUtils/xsubpp -typemap /usr/lib/perl5/ExtUtils/typemap -typemap typemap GD.xs > GD.xsc && mv GD.xsc GD.c
cc -c -I/usr/include -Wformat=0 -O2 -march=i486 -mtune=i686 -DVERSION=\"2.46\" -DXS_VERSION=\"2.46\" -fPIC "-I/usr/lib/perl5/CORE" -DHAVE_JPEG -DHAVE_FT -DHAVE_XPM -DHAVE_GIF -DHAVE_PNG -DHAVE_ANIMGIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FONTCONFIG -DHAVE_FTCIRCLE GD.c
Running Mkbootstrap for GD ()
chmod 644 GD.bs
rm -f blib/arch/auto/GD/GD.so
LD_RUN_PATH="/usr/lib" cc -shared -O2 -march=i486 -mtune=i686 -L/usr/local/lib -fstack-protector GD.o -o blib/arch/auto/GD/GD.so \
-L/usr/lib -L/usr/lib -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng14 -lz -lm -lgd \
chmod 755 blib/arch/auto/GD/GD.so
cp GD.bs blib/arch/auto/GD/GD.bs
chmod 644 blib/arch/auto/GD/GD.bs
/usr/bin/perl5.16.1 "-Iblib/arch" "-Iblib/lib" bdf_scripts/bdf2gdfont.PLS bdf_scripts/bdf2gdfont.pl
Extracting bdf2gdfont.pl (with variable substitutions)
cp bdf_scripts/bdf2gdfont.pl blib/script/bdf2gdfont.pl
/usr/bin/perl5.16.1 -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/bdf2gdfont.pl
Manifying blib/man1/bdf2gdfont.pl.1
Manifying blib/man3/GD::Polyline.3
Manifying blib/man3/GD::Image.3
Manifying blib/man3/GD::Simple.3
Manifying blib/man3/GD.3
Manifying blib/man3/GD::Polygon.3
root@sms:/tmp/GD-2.46# make test
PERL_DL_NONLAZY=1 /usr/bin/perl5.16.1 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD.t ........ Not a CODE reference at /usr/lib/perl5/DynaLoader.pm line 213.
END failed--call queue aborted at blib/lib/GD.pm line 213.
Compilation failed in require at t/GD.t line 14.
BEGIN failed--compilation aborted at t/GD.t line 14.
t/GD.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 12/12 subtests
t/Polyline.t .. Not a CODE reference at /usr/lib/perl5/DynaLoader.pm line 213.
END failed--call queue aborted at /tmp/GD-2.46/blib/lib/GD.pm line 213.
Compilation failed in require at /tmp/GD-2.46/blib/lib/GD/Polyline.pm line 45.
BEGIN failed--compilation aborted at /tmp/GD-2.46/blib/lib/GD/Polyline.pm line 45.
Compilation failed in require at t/Polyline.t line 10.
BEGIN failed--compilation aborted at t/Polyline.t line 10.
t/Polyline.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/1 subtests
Test Summary Report
-------------------
t/GD.t (Wstat: 512 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 2
Parse errors: Bad plan. You planned 12 tests but ran 1.
t/Polyline.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 1 tests but ran 0.
Files=2, Tests=1, 1 wallclock secs ( 0.06 usr 0.08 sys + 0.37 cusr 0.13 csys = 0.64 CPU)
Result: FAIL
Failed 2/2 test programs. 1/1 subtests failed.
make: *** [test_dynamic] Error 2
| I still can't find the issue myself
Well, it would be very nice to include stable lightsquid 1.8 into SMS distribution instead of so slow SARG. BTW, the last one has a typo in config -- /var/lib/squid/logs/access.log instead of /var/log/squid/logs/access.log, so it can't be successfully configured via Webmin. _________________ In CODe we TRUST! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Fri Sep 28, 2012 1:24 pm Post subject: |
|
|
Have you upgrade perl-modules package?
Since you were trying to install GD yourself you should remove your GD installation and then install perl-modules again.
Your installation of GD is at
/usr/lib/perl5/GD
and
/usr/lib/perl/auto/GD
you should remove those folders and /usr/lib/perl5/GD.pm
SMS installation is at /usr/lib/perl5/vendor_perl/GD
I would recommend using perl-modules package, so you don't have problems with feature upgrades with perl.
Also GD has an issue in x86 installations, to fix it you must run
Code: | make CCFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" |
Thanks for the bug report in sarg package, it's outdated so that's a good reason to replace it with lightsquid.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Ansy Member
Joined: 24 Feb 2011 Posts: 42 Location: RUSSIA
|
Posted: Tue Oct 02, 2012 3:27 pm Post subject: |
|
|
Well done, gerasimos_h, thanks!
I've deleted all GD' stuff from perl directory you've noticed, removed perl-modules and reinstalled it again via slapt-get.
Now lightsquid passes tests OK and makes graphs!
But I've had many troubles with httpd access rights to lightsquid web directory, now I can't remember what the exact trick got it solved... I'll tell you later, after upgrading and installing another SMS server.
P.S. May be that's enough about .htaccess file in httpd.conf... my be something else. _________________ In CODe we TRUST! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Oct 02, 2012 3:46 pm Post subject: |
|
|
By default SMS's httpd.conf allows override (AllowOverride All) so you will have to problem with /var/www/htdocs/lightsquid/.htaccess
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Ansy Member
Joined: 24 Feb 2011 Posts: 42 Location: RUSSIA
|
Posted: Tue Oct 02, 2012 4:05 pm Post subject: |
|
|
This string Code: | AccessFileName .htaccess | was absent in httpd.conf as I've found, but may be not only, because I've tried to fix many other options before. _________________ In CODe we TRUST! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Oct 02, 2012 4:42 pm Post subject: |
|
|
Quote: | AccessFileName .htaccess |
That's the default behavior, but if setting is set to "AllowOverride None" doesn't make any difference, that's why lightsquid install.txt state to use a <Directory /> option in httpd.conf, that's way you can skip .htaccess and it's faster.
Only option you have to change if you are upgrading from quite old releases (SMS-1.4.x) to work is "AllowOverride none" to "AllowOverride All" in <Directory "/srv/httpd/htdocs">
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
|