久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

Apache Server 的個(gè)案討論

 農(nóng)夫子oice 2007-04-28

Apache Server 的個(gè)案討論

個(gè)案1: 在同一臺(tái)機(jī)器上 提供兩個(gè) http 服務(wù) (by domain name)

說明: 甲公司希望在一臺(tái)機(jī)器上提供 http://www. 供外界上網(wǎng)查公司的公開資訊,,又提供 http://intranet. 供員工使用內(nèi)部的一些系統(tǒng),。

做法:

1. 首先在1個(gè)IP 上對(duì)應(yīng)2個(gè) domain name ( 需由 DNS 加入)

2. 更改 /etc/httpd/conf/httpd.conf 的最後面

#NameVirtualHost *
NameVirtualHost 210.240.252.2

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin [email protected]
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost 210.240.252.2>
DocumentRoot
/var/www/html
ServerName
www.
ErrorLog logs/error_www_log
CustomLog logs/access_www_log common
</VirtualHost>
<VirtualHost 210.240.252.2>
DocumentRoot
/var/www/html2
ServerName
intranet.
ErrorLog logs/error_intranet_log
CustomLog logs/access_intranet_log common
</VirtualHost>

 

個(gè)案2: 在同一臺(tái)機(jī)器上 提供兩個(gè) http 服務(wù) (by port number)

說明: 甲公司希望在一臺(tái)機(jī)器上提供 http://www. 供外界上網(wǎng)查公司的公開資訊,又提供 http://www.:8080 供員工使用內(nèi)部的一些系統(tǒng)。

做法:

1. 首先在1個(gè)IP 上對(duì)應(yīng)2個(gè) domain name ( 需由 DNS 加入)

2. 更改 /etc/httpd/conf/httpd.conf 的 listen 多加一行 Listen 8080

Listen 80
Listen 8080

3. 更改 /etc/httpd/conf/httpd.conf 的最後面

#NameVirtualHost *
NameVirtualHost 210.240.232.2

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin [email protected]
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost *:80>
DocumentRoot
/var/www/html
ServerName
www.
ErrorLog logs/error_www_log
CustomLog logs/access_www_log common
</VirtualHost>
<VirtualHost *
:8080>
DocumentRoot
/var/www/html2
ServerName
intranet.
ErrorLog logs/error_intranet_log
CustomLog logs/access_intranet_log common
</VirtualHost>

個(gè)案3: 以密碼保護(hù)網(wǎng)頁

1. nano /etc/httpd/conf/httpd.conf

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride None - by poter
AllowOverride All

2. [root@proxyd opt]# htpasswd -c /opt/.htpasswd tom
New password:
Re-type new password:
Adding password for user tom

3. cat /opt/.htpasswd
tom:fkzneVy61GKXw

4. nano /var/www/html/.htaccess

AuthUserFile /opt/.htpasswd
AuthName "Private directory"
AuthType Basic
require valid-user

from:  http://poterp.iem./linux/apache.htm

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點(diǎn),。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多