国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當前位置: 首頁 > news >正文

整站seo排名公司天津seo渠道代理

整站seo排名公司,天津seo渠道代理,建設一個網(wǎng)站需要條件,wordpress延時加載目錄 5.1.Ngnix配置基于用戶訪問控制的多虛擬主機 5.1.1.前提條件 5.1.2.Ngnix配置基于用戶訪問控制的多虛擬主機 5.2.Ngnix配置基于IP的虛擬主機 5.3.Ngnix配置基于IP的多虛擬主機 Nginx配置文件在/usr/local/nginx/conf下,文件名為nginx.conf 5.1.Ngnix配置…

目錄

5.1.Ngnix配置基于用戶訪問控制的多虛擬主機

5.1.1.前提條件

5.1.2.Ngnix配置基于用戶訪問控制的多虛擬主機

5.2.Ngnix配置基于IP的虛擬主機

5.3.Ngnix配置基于IP的多虛擬主機


Nginx配置文件在/usr/local/nginx/conf下,文件名為nginx.conf

5.1.Ngnix配置基于用戶訪問控制的多虛擬主機

5.1.1.前提條件

Ngnix配置基于用戶訪問控制的多虛擬主機時,需要使用htpasswd命令,需要安裝httpd-tools rpm

命令:

yum install -y httpd-tools

[root@cent79-2 ~]# yum install -y httpd-tools
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* centos-sclo-rh: mirrors.huaweicloud.com* centos-sclo-sclo: mirrors.huaweicloud.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-99.el7.centos.1 will be installed
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-tools-2.4.6-99.el7.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-tools-2.4.6-99.el7.centos.1.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-7.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7_9.1 will be installed
--> Finished Dependency ResolutionDependencies Resolved=============================================================================================================Package                  Arch                Version                             Repository            Size
=============================================================================================================
Installing:httpd-tools              x86_64              2.4.6-99.el7.centos.1               updates               94 k
Installing for dependencies:apr                      x86_64              1.4.8-7.el7                         CentOS7              104 kapr-util                 x86_64              1.5.2-6.el7_9.1                     updates               92 kTransaction Summary
=============================================================================================================
Install  1 Package (+2 Dependent packages)Total download size: 290 k
Installed size: 584 k
Downloading packages:
(1/2): apr-util-1.5.2-6.el7_9.1.x86_64.rpm                                            |  92 kB  00:00:00     
(2/2): httpd-tools-2.4.6-99.el7.centos.1.x86_64.rpm                                   |  94 kB  00:00:00     
-------------------------------------------------------------------------------------------------------------
Total                                                                        356 kB/s | 290 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : apr-1.4.8-7.el7.x86_64                                                                    1/3 Installing : apr-util-1.5.2-6.el7_9.1.x86_64                                                           2/3 Installing : httpd-tools-2.4.6-99.el7.centos.1.x86_64                                                  3/3 Verifying  : apr-util-1.5.2-6.el7_9.1.x86_64                                                           1/3 Verifying  : apr-1.4.8-7.el7.x86_64                                                                    2/3 Verifying  : httpd-tools-2.4.6-99.el7.centos.1.x86_64                                                  3/3 Installed:httpd-tools.x86_64 0:2.4.6-99.el7.centos.1                                                                 Dependency Installed:apr.x86_64 0:1.4.8-7.el7                         apr-util.x86_64 0:1.5.2-6.el7_9.1                        Complete!
[root@cent79-2 ~]# 

5.1.2.Ngnix配置基于用戶訪問控制的多虛擬主機

-->進入/usr/local/nginx/conf目錄

命令:

cd /usr/local/nginx/conf

pwd

[root@cent79-2 conf]# cd /usr/local/nginx/conf/
[root@cent79-2 conf]# pwd
/usr/local/nginx/conf
[root@cent79-2 conf]#

-->編輯nginx.conf,并保存

命令:

vi nginx.conf

-->?驗證nginx.conf語法的正確性

命令:

nginx -t

[root@cent79-2 conf]# nginx -t
nginx: the configuration file /usr/local/nginx//conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx//conf/nginx.conf test is successful
[root@cent79-2 conf]# 

-->創(chuàng)建用戶訪問控制文件

命令:

htpasswd -c /usr/local/nginx/conf/nginxpasswd ztj

[root@cent79-2 conf]# htpasswd -c /usr/local/nginx/conf/nginxpasswd ztj
New password: 
Re-type new password: 
Adding password for user ztj
[root@cent79-2 conf]# cat /usr/local/nginx/conf/nginxpasswd
ztj:$apr1$bKLsHgJ3$X8j4Buj2KCw4ojcm3HuTX1
[root@cent79-2 conf]# 

備注:

如果創(chuàng)建多個用戶訪問控制時,后續(xù)命令為:

htpasswd? /usr/local/nginx/conf/nginxpasswd USERNAME

-->重啟nginx

命令:

nginx -s stop

nginx

[root@cent79-2 conf]# nginx -s stop
[root@cent79-2 conf]# ps -ef |grep nginx
root       1354   1245  0 15:39 pts/0    00:00:00 grep --color=auto nginx
[root@cent79-2 conf]# nginx
[root@cent79-2 conf]# ps -ef |grep nginx
root       1356      1  0 15:39 ?        00:00:00 nginx: master process nginx
nginx      1357   1356  0 15:39 ?        00:00:00 nginx: worker process
root       1359   1245  0 15:40 pts/0    00:00:00 grep --color=auto nginx
[root@cent79-2 conf]# 

-->驗證

http://www.itztj.com

輸入通過htpasswd命令創(chuàng)建的用戶控制文件的用戶名和密碼

http://www.itxiaohei.com

?輸入通過htpasswd命令創(chuàng)建的用戶控制文件的用戶名和密碼

5.2.Ngnix配置基于IP的虛擬主機

?-->進入/usr/local/nginx/conf目錄

命令:

cd /usr/local/nginx/conf

pwd

[root@cent79-2 conf]# cd /usr/local/nginx/conf/
[root@cent79-2 conf]# pwd
/usr/local/nginx/conf
[root@cent79-2 conf]#

-->編輯nginx.conf,并保存

命令:

vi nginx.conf

?-->?驗證nginx.conf語法的正確性

命令:

nginx -t

[root@cent79-2 conf]# nginx -t
nginx: the configuration file /usr/local/nginx//conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx//conf/nginx.conf test is successful
[root@cent79-2 conf]# 

-->重新加載nginx

命令:

nginx -s reload

[root@cent79-2 conf]# nginx -s reload
[root@cent79-2 conf]# ps -ef |grep nginx
root       1591      1  0 16:04 ?        00:00:00 nginx: master process nginx
nginx      1594   1591  0 16:04 ?        00:00:00 nginx: worker process
root       1596   1182  0 16:05 pts/0    00:00:00 grep --color=auto nginx
[root@cent79-2 conf]# 

-->驗證

curl 192.168.10.156

[root@cent79-2 conf]# curl 192.168.10.156
I am itztj
[root@cent79-2 conf]# 

宿主機驗證

5.3.Ngnix配置基于IP的多虛擬主機

?-->進入/usr/local/nginx/conf目錄

命令:

cd /usr/local/nginx/conf

pwd

[root@cent79-2 conf]# cd /usr/local/nginx/conf/
[root@cent79-2 conf]# pwd
/usr/local/nginx/conf
[root@cent79-2 conf]#

-->編輯nginx.conf,并保存

命令:

vi nginx.conf

?-->?驗證nginx.conf語法的正確性

命令:

nginx -t

[root@cent79-2 conf]# nginx -t
nginx: the configuration file /usr/local/nginx//conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx//conf/nginx.conf test is successful
[root@cent79-2 conf]# 

-->重新加載nginx

命令:

nginx -s reload

[root@cent79-2 conf]# nginx -s reload
[root@cent79-2 conf]# ps -ef |grep nginx
root       1591      1  0 16:04 ?        00:00:00 nginx: master process nginx
nginx      1594   1591  0 16:04 ?        00:00:00 nginx: worker process
root       1596   1182  0 16:05 pts/0    00:00:00 grep --color=auto nginx
[root@cent79-2 conf]# 

?-->驗證

http://m.aloenet.com.cn/news/28382.html

相關文章:

  • 網(wǎng)絡營銷案例分析心得seo網(wǎng)絡營銷技術
  • 拼多多網(wǎng)頁qq登錄南昌seo公司
  • 亞馬遜seo關鍵詞優(yōu)化軟件seo技術優(yōu)化
  • 不用囤貨北京正規(guī)seo搜索引擎優(yōu)化價格
  • seo網(wǎng)站推廣工具aso優(yōu)化教程
  • 網(wǎng)站建設用啥技術網(wǎng)絡營銷師報考條件
  • wordpress站群系統(tǒng)南京網(wǎng)站建設
  • 重慶品牌網(wǎng)站建設公司哪家好湖南網(wǎng)絡推廣服務
  • 網(wǎng)站怎么在百度做推廣seo排名關鍵詞點擊
  • 網(wǎng)站開發(fā)需要什么技術人員成都新站軟件快速排名
  • 如何制作一個優(yōu)秀網(wǎng)站建設如何進行網(wǎng)絡推廣和宣傳
  • 有一個專門做lol同人的網(wǎng)站百度客戶端手機版
  • 有沒有做家具特賣的網(wǎng)站疫情最新動態(tài)
  • 貴陽哪里做網(wǎng)站營銷企業(yè)
  • 加工平臺快抖霸屏樂云seo
  • 難道做網(wǎng)站的工資都不高嗎百度銷售推廣
  • 南寧網(wǎng)站建設代理婚戀網(wǎng)站排名前十名
  • 東坑鎮(zhèn)仿做網(wǎng)站baidu百度
  • 網(wǎng)站做404好處直播:英格蘭vs法國
  • 商丘市網(wǎng)站建設公司合肥網(wǎng)站優(yōu)化軟件
  • 求職簡歷模板電子版免費seo怎么做優(yōu)化計劃
  • 黃埔區(qū)做網(wǎng)站英文外鏈seo兼職
  • 中學生制作網(wǎng)站怎么做百度廣告買下的訂單在哪里找
  • 中國十大建筑設計事務所北京自動seo
  • 做公眾號關注網(wǎng)站整站關鍵詞快速排名
  • 畢業(yè)設計做網(wǎng)站怎么答辯千牛怎么做免費推廣引流
  • 發(fā)布網(wǎng)站建設信息百度網(wǎng)站推廣價格
  • 項目營銷策劃方案360優(yōu)化大師官方下載
  • dede可以做視頻網(wǎng)站百度關鍵詞指數(shù)排行
  • 羅源網(wǎng)站建設seo搜索引擎優(yōu)化技術教程