[ LUGOS ] Apache vprasanje
Damir Dezeljin
programing at nib.si
Tue Jun 12 10:58:37 CEST 2001
Zadevo sem resil na sledec nacin:
nastavil sem domeno intranet.mojadomena.si, ki je cname na server
nato sem dodal v httpd.conf virtual host za to domeno in noter napisal
(btw hotel sem doviliti dostop le IPjem 192.168.0.0/28 - torej 64im
IPjem):
...
RewriteEngine on
RewriteLogLevel 1
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.[1-9]$
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.[1-5][0-9]$
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.[6][0-3]$
RewriteRule ^/(.*) https://intranet.mojadomena.si/$1 [R]
RewriteLog /path_kar_nekam/RewriteLog
<Directory "/path_to_http_root">
AllowOverride AuthConfig Limit
</Directory>
...
definiral sem se virtual host za isto domeno vendar na portu 443 (torej
ssl), noter ni treba dajat Rwrite* , je pa treba dodat tisto z
<Directory ...
V .htaccess pa sem napisal:
Order deny,allow
Deny from all
Allow from 192.168.0.0/28 127.0.0.1
Satisfy any
AuthType Basic
AuthName "Kar neki"
AuthUserFile /en_path/.htpass
Require valid-user
Upam da je to komu v pomoc...
Lp,
Dezo
More information about the lugos-list
mailing list