欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
Apache用戶(hù)認證方法匯總--孤狼的窩兒~~

Apache用戶(hù)認證方法匯總

一.基本的Apache用戶(hù)認證方法: 

若對某一目錄下的文件如/home/ftp/pub需要做到用戶(hù)認證,則在httpd.conf 
中加入下面的行 
<> 
options indexes followsymlinks 
allowoverride authconfig 
order allow,deny 
allow from all 

<> 
用在目錄/home/ftp/pub下放文件.htaccess,內容如下: 
authname "shared files" 
authtype basic 
authuserfile /etc/.passwd 
require valid-user 

用隨Apache來(lái)的程序htpasswd 生成文件/etc/.passwd,每行一個(gè)用戶(hù)名:密碼 

只要能提供正確的用戶(hù)名和密碼對,就允許登錄訪(fǎng)問(wèn),這是針對任何地址來(lái)的 
請求都要求提供用戶(hù)名和密碼認證?!?br>
二.針對部分網(wǎng)段或地址要求認證?!?br>
若公司LAN所在網(wǎng)段為192.168.0.0/24,且有一防火墻專(zhuān)線(xiàn)接入Internet, 
內部網(wǎng)卡的地址為192.168.0.1/32,則現在希望所有通過(guò)撥本地163通過(guò) 
防火墻上的apache反向代理向LAN上的另一WWW服務(wù)器訪(fǎng)問(wèn)時(shí)需要認證,而本地 
LAN上的用戶(hù)不需認證??梢栽趆ttpd.conf中放入: 
〈Directory /home/ftp/pub> 
Options Indexes FollowSymLinks 
AllowOverride AuthConfig 
order deny,allow 
deny from 192.168.0.1 
〈/Directory> 

且在/home/ftp/pub/.htaccess中放入: 
AuthName "shared files" 
AuthType Basic 
AuthUserFile /etc/.passwd 
require valid-user 
satisfy any 

三.對同一目錄及其下的子目錄有不同的權限,僅某些人可以存取一目錄下的 
子目錄?!?br>如有一目錄/home/ftp/pub/sales,有三個(gè)用戶(hù)user1,user2,user3都需要用戶(hù)名 
和密碼進(jìn)入/home/ftp/pub,但僅user1,user2能進(jìn)入/home/ftp/pub/sales.則 
放下面的行到httpd.conf 

〈Directory /home/ftp/pub> 
Options Indexes 
AllowOverride AuthConfig 
order allow,deny 
allow from all 
〈/Directory> 

〈Directory /home/ftp/pub/sales> 
Options Indexes 
AllowOverride AuthConfig 
order allow,deny 
allow from all 
〈/Directory> 

且看/home/ftp/pub/.htaccess為: 
AuthName "shared files" 
AuthType Basic 
AuthUserFile /etc/.passwd 
require valid-user 

且看/home/ftp/pub/sales/.htaccess 
AuthName "shared files" 
AuthType Basic 
AuthUserFile /etc/.passwd 
AuthGroupFile /etc/.salesgroup 
require group manager 

且文件/etc/.passwd內容為: 
user1:passwd1 
user2:passwd2 
user3:passwd3 

且文件/etc/.salesgroup內容為: 
manager: user1 user2 

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
Apache 全攻略
Linux技術(shù)中堅站論壇 - 網(wǎng)上Linux樂(lè )園
.htaccess重定向和url重寫(xiě)詳細介紹
創(chuàng )建局域網(wǎng)內的離線(xiàn) YUM 倉庫 | Linux 中國
TWiki的安裝,配置和用戶(hù)管理
使用apache和htaccess對目錄訪(fǎng)問(wèn)設置密碼保護配置教程
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久