91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

http2

發布時間:2020-03-01 14:39:09 來源:網絡 閱讀:436 作者:Taxing祥 欄目:網絡安全

1.http訪問權限

cd /var/www/

mkdir taxing#selinux 為強制狀態時需要此步驟,關閉則不需要

semanage frcontext -a -t http_sys_content_t '/www/taxing(/.*)?'

restorecon -RccF /www/

ls -Zd .

 

vim /etc/httpd/conf/httpd.conf

119 #DocumentRoot "/var/www/html"#修改訪問默認目錄

120 DocumentRoot "/var/www/taxing"

121 <Directory "/var/www/taxing">

122         require all granted#開放對所有人的訪問權限

123         Order Allow,Deny#讀取順序

124         Allow from ALL#允許對所有人

125         Deny from 172.25.254.24#拒絕172.25.254.24對httpd的訪問

126 </Directory>

 

170     DirectoryIndex timo index.html#訪問文件 (172.25.254.124/timo)(172.25.254.124)

 

42 Listen 80#8080#訪問端口(172.25.254.124)(172.25.254.124:8080)

 

ctrl+shift+Delete#清除緩存

2.密碼登陸

cd /etc/httpd/

htpasswd -cm htpasswdfile timo#創建用戶和密碼

htpasswd -m htpasswdfile rito#添加用戶和密碼

[root@timo httpd]# cat htpasswdfile

timo:$apr1$jUAeuJ.m$LaTdnIBzxWb71oObNgFTx/

rito:$apr1$mFwqLnWl$DErf.PJTjijn3Xt8eJfDG/

 

vim /etc/httpd/conf/httpd.conf

#DocumentRoot "/var/www/html"

DocumentRoot "/var/www/taxing"

<Directory "/var/www/taxing">

        #require all granted

        AllowOverride All

        Authuserfile /etc/httpd/htpasswdfile#讀取文件

        Authname "Please input username and password"#

        Authtype basic

        Require user timo

</Directory>

 

3.創建虛擬主機

vim /etc/http/conf/httpd.conf#刪除之前的修改,恢復到修改之前

mkdir /var/www/virtual/news.timo.com/html -p

mkdir /var/www/virtual/music.timo.com/html -p

cd /etc/http/conf.d/

vim default.conf

<Virtualhost _dafault_:80>

        Documentroot /var/www/html

        Customlog "logs/default.log" combined

</Virtualhost>

<Directory "/var/www/html">

        Require all granted

</Directory>

vim news.conf

<Virtualhost *:80>

        Servername news.timo.com

        Documentroot /var/www/virtual/news.timo.com/html

        Customlog "logs/news.log" combined

</Virtualhost>

<Directory "/var/www/virtual/news.timo.com/html">

        Require all granted

</Directory>                        

cp news.conf music.conf

vim music.conf

<Virtualhost *:80>

        Servername music.timo.com

        Documentroot /var/www/virtual/music.timo.com/html

        Customlog "logs/music.log" combined

</Virtualhost>

<Directory "/var/www/virtual/music.timo.com/html">

        Require all granted

</Directory>

cd /var/www/virtual/news.timo.com/html

vim index.html

news.timo.com

cd/var/www/virtual/music.timo.com/html

vim index.html

music.timo.com

在使用瀏覽器主機上

vim /etc/hosts

172.25.254.124 www.timo.com timo.com music.timo.com news.timo.com

 

4.創建自己的https證書

yum install  mod_ssl -y

systemctl restart httpd.service

 

netstat -antlpe | grep 443

yum install crypto-utils.x86_64 -y

genkey www.timo.com

http2

http2

http2

http2

http2

http2

http2

http2

ls /etc/pki/tls/certs/

vim /etc/http/conf.d/ssl.conf

SSLCertificateFile /etc/pki/tls/certs/www.timo.com.crt

SSLCertificateKeyFile /etc/pki/tls/private/www.timo.com.key

在客戶機:https://172.25.254.124

 

ctrl+alt+delete刪除緩存


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

巴南区| 永德县| 莒南县| 南溪县| 阿鲁科尔沁旗| 桃园县| 法库县| 乐陵市| 朝阳县| 宾川县| 固始县| 泰顺县| 麻栗坡县| 腾冲县| 蒙阴县| 连山| 三明市| 长顺县| 九龙城区| 镇雄县| 陵川县| 内乡县| 通海县| 宁武县| 抚州市| 永兴县| 双峰县| 宁海县| 松原市| 辛集市| 阿瓦提县| 张家港市| 讷河市| 平乡县| 元谋县| 开封县| 门头沟区| 广汉市| 溧水县| 石泉县| 苏州市|