LINUX.ORG.RU
ФорумAdmin

htaccess forbidden

 ,


0

2

Здравия желаю! Ув господа подскажите мне пожалуйста. Есть шлюз, на нем прозрачный squid3, apache, postfix с обвесами. Все великолепно работает. Решил ограничить доступ к админке и редиректить тех кому разрешен доступ с 80 порта на 443 при помощью htaccess. С внешних адресов все впорядке. Кому разрешено, доступ имеют и редирект происходит. Из LAN кто ходит мимо прокси тоже, а вот те кого в прокси, получают forbidden. Вроде это и не критично, можно зиайти и по https, но всетаки... КОРОБИТ!

.htaccess

Options All -Indexes
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}:443/adm/$1
Order Deny,Allow
Deny from all
Allow from 192.168.1.
Allow from user1 ip, user2 ip, user3 ip
на всякий случай squid.conf
dns_nameservers 127.0.0.1

negative_ttl 1 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 1 minutes
hosts_file /etc/hosts
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

acl apache rep_header Server ^Apache
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 192.168.1.0/24
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgtm
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl SSL_ports port 443          # https
acl SSL_ports port 563          # snews
acl SSL_ports port 873          # rsync
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all

http_port 192.168.1.1:3128 transparent

error_directory /usr/share/squid/errors/ru

url_rewrite_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf

cache_mem 512 MB
maximum_object_size_in_memory 512 KB
#cache_dir ufs /var/spool/squid 2048 16 265
cache deny all
cache_mgr post@my.domen
cache_effective_group squid
cache_effective_user squid
access_log /var/log/squid/access.log squid

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%	1440
refresh_pattern (cgi-bin|\?)    0	0%	0
refresh_pattern .               0	20%     4320


Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.