国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目

這篇具有很好參考價(jià)值的文章主要介紹了Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

目錄

nginx的簡(jiǎn)介

是什么

nginx的特點(diǎn)以及功能

Nginx負(fù)載均衡

下載?

安裝?

負(fù)載均衡


nginx的簡(jiǎn)介

是什么

Nginx是一個(gè)高性能的開源Web服務(wù)器和反向代理服務(wù)器。它的設(shè)計(jì)目標(biāo)是為了解決C10k問題,即在同一時(shí)間內(nèi)支持上萬(wàn)個(gè)并發(fā)連接。

Nginx采用事件驅(qū)動(dòng)的異步架構(gòu),能夠高效地處理大量并發(fā)請(qǐng)求,同時(shí)占用較少的系統(tǒng)資源。它具有良好的擴(kuò)展性和高可靠性,廣泛應(yīng)用于大型網(wǎng)站和高負(fù)載的Web應(yīng)用中。

nginx的特點(diǎn)以及功能

  1. 高性能:Nginx采用異步非阻塞的處理方式,可以高效地處理大量并發(fā)請(qǐng)求,具有較低的內(nèi)存消耗和CPU利用率。

  2. 反向代理:Nginx可以作為反向代理服務(wù)器,將客戶端的請(qǐng)求轉(zhuǎn)發(fā)給后端的多個(gè)服務(wù)器,實(shí)現(xiàn)負(fù)載均衡和高可用性。

  3. 靜態(tài)文件服務(wù):Nginx可以快速地提供靜態(tài)文件的訪問,減輕動(dòng)態(tài)應(yīng)用服務(wù)器的負(fù)載。

  4. 動(dòng)態(tài)反向代理:Nginx可以通過配置動(dòng)態(tài)反向代理規(guī)則,將請(qǐng)求轉(zhuǎn)發(fā)給不同的后端服務(wù)器,實(shí)現(xiàn)靈活的請(qǐng)求處理和應(yīng)用切換。

  5. SSL/TLS支持:Nginx支持HTTPS協(xié)議,并提供了強(qiáng)大的SSL/TLS功能,可以保護(hù)網(wǎng)站的安全性。

  6. URL重寫和重定向:Nginx支持強(qiáng)大的URL重寫和重定向功能,可以通過配置簡(jiǎn)化URL結(jié)構(gòu)和實(shí)現(xiàn)請(qǐng)求的重定向。

  7. 緩存和壓縮:Nginx支持靜態(tài)文件的緩存和內(nèi)容的壓縮,提高網(wǎng)站的性能和傳輸速度。

?總之,Nginx是一個(gè)高性能、可靠性強(qiáng)、功能豐富的Web服務(wù)器和反向代理服務(wù)器,適用于各種規(guī)模的網(wǎng)站和應(yīng)用場(chǎng)景。它的簡(jiǎn)單配置和靈活性使得它成為許多開發(fā)者和系統(tǒng)管理員的首選。

Nginx負(fù)載均衡

下載?

輸入命令 :??cd /root/xyh/software? 進(jìn)入到資源文件目錄

安裝?Nginx?的4個(gè)依賴

輸入命令 :?yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

安裝完成后進(jìn)行解壓使用

輸入命令 :??tar -xvf nginx-1.13.7.tar.gz? ?( 解壓?Nginx)

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

解壓后進(jìn)入其文件

命令 :??cd nginx-1.13.7??

編譯,執(zhí)行配置: 考慮到后續(xù)安裝ssl證書 添加兩個(gè)模塊

命令 :?./configure --with-http_stub_status_module --with-http_ssl_module

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

安裝?

進(jìn)行安裝

命令 :???make && make install

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡?

安裝完后,進(jìn)入該目錄

輸入命令 :??cd /usr/local/nginx

安裝完后,進(jìn)入該目錄

輸入命令 :??cd /usr/local/nginx

啟動(dòng)前安裝?lsof?命令

輸入命令 :??yum install -y ?lsof

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡?

設(shè)置防火墻 開放 80 端口

輸入命令 :?firewall-cmd --zone=public --add-port=80/tcp --permanent

更新防火墻的端口并且查看已開放的端口

輸入命令 :??firewall-cmd --reload && firewall-cmd --list-port

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡?

# 啟動(dòng)

命令 :??./nginx

#查看?

命令 :??lsof -i:80

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

在瀏覽器中,輸入虛擬機(jī)【Linux】-Centos的IP地址進(jìn)行搜索?

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡?以上就是Nginx?的使用配置并且開啟完成了

負(fù)載均衡

在資源文件夾中,創(chuàng)建一個(gè)tomcat文件夾,來(lái)存放Tomcat
輸入命令 :??mkdir tomcat

并且將tomcat服務(wù)解壓到指定目錄,剛剛創(chuàng)建的tomcat文件夾中。

輸入命令 :?tar -xvf apache-tomcat-8.5.tar.gz -C tomcat

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡?

進(jìn)入tomcat文件夾中

命令 :??cd /root/xyh/software/tomcat

復(fù)制一個(gè)tomcat,準(zhǔn)備2個(gè)tomcat

命令 :?cp -r apache-tomcat-8.5.20/ apache-tomcat-8.5.20_8081/

查看命令 :?ll

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

將其中的一個(gè)tomcat修改端口,避免兩個(gè)服務(wù)同時(shí)開啟時(shí)端口被占用的情況。

命令 :??cd apache-tomcat-8.5.20/conf? ?( 進(jìn)入到tomcat的conf文件中 )

找到server.xml 文件進(jìn)行修改端口

命令 :?vim server.xml? ?( 編輯文件修改端口?)?

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡?

Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡?修改之后的代碼

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8006" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
 
  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
 
  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
 
    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->
 
 
    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8081" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the
         AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
 
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
 
 
    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->
 
    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">
 
      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->
 
      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
 
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
 
        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->
 
        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
 
      </Host>
    </Engine>
  </Service>
</Server>

?并且將這個(gè)服務(wù)器的頁(yè)面顯示內(nèi)容進(jìn)行修改,訪問時(shí)容易分辨是哪個(gè)tomcat端口進(jìn)入的

?在tomcat根目錄的webapps中的ROOT目錄中,找到index.jsp文件,在MobaXterm工具的左邊選中這個(gè)文件,右鍵點(diǎn)擊第二個(gè)進(jìn)行打開文件,并且修改編輯文件。

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

修改完之后的代碼如下

<%--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at
 
    http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--%>
<%@ page session="false" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy");
request.setAttribute("year", sdf.format(new java.util.Date()));
request.setAttribute("tomcatUrl", "http://tomcat.apache.org/");
request.setAttribute("tomcatDocUrl", "/docs/");
request.setAttribute("tomcatExamplesUrl", "/examples/");
%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title><%=request.getServletContext().getServerInfo() %></title>
        <link href="favicon.ico" rel="icon" type="image/x-icon" />
        <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <link href="tomcat.css" rel="stylesheet" type="text/css" />
    </head>
 
    <body>
    <h1>8081</h1>
       
    </body>
 
</html>

返回到tomcat目錄,并且開其兩個(gè)服務(wù)(tomcat)?

命令:??cd apache-tomcat-8.5.20/bin??( 進(jìn)入到tomcat的bin目錄中?)

?命令:??./startup.sh? ?( 開啟服務(wù) )

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

再到?nginx的目錄中

命令:? cd /usr/local/nginx

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

并且進(jìn)入 : sbin目錄

輸入 :??cd sbin

命令 :??./nginx -s reload? ?

注 : 重新開啟nginx

?Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目,linux,nginx,負(fù)載均衡

今天就到這里了!下班下班?。。。。。。。。。。。。。。。?文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-741691.html

到了這里,關(guān)于Linux-----nginx的簡(jiǎn)介,nginx搭載負(fù)載均衡以及nginx部署前后端分離項(xiàng)目的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Django筆記四十四之Nginx+uWSGI部署Django以及Nginx負(fù)載均衡操作

    Django筆記四十四之Nginx+uWSGI部署Django以及Nginx負(fù)載均衡操作

    本文首發(fā)于公眾號(hào):Hunter后端 原文鏈接:Django筆記四十四之Nginx+uWSGI部署Django以及Nginx負(fù)載均衡操作 這一篇筆記介紹如何使用 Nginx + uWSGI 來(lái)部署 Django。 上一篇筆記中有介紹直接使用 uWSGI 作為 web 服務(wù)器來(lái)部署 Django,這一篇筆記介紹如何使用 Nginx 來(lái)部署。 使用 Nginx 來(lái)部署相

    2024年02月05日
    瀏覽(27)
  • 【Linux】在Ubuntu下部署nginx——nginx的負(fù)載均衡

    【Linux】在Ubuntu下部署nginx——nginx的負(fù)載均衡

    介紹 這里是小編成長(zhǎng)之路的歷程,也是小編的學(xué)習(xí)之路。希望和各位大佬們一起成長(zhǎng)! 以下為小編最喜歡的兩句話: 要有最樸素的生活和最遙遠(yuǎn)的夢(mèng)想,即使明天天寒地凍,山高水遠(yuǎn),路遠(yuǎn)馬亡。 一個(gè)人為什么要努力? 我見過最好的答案就是:因?yàn)槲蚁矚g的東西都很貴,

    2024年02月12日
    瀏覽(18)
  • 【Linux】Nginx+Tomcat負(fù)載均衡、動(dòng)靜分離、多實(shí)例部署

    【Linux】Nginx+Tomcat負(fù)載均衡、動(dòng)靜分離、多實(shí)例部署

    提示:文章寫完后,目錄可以自動(dòng)生成,如何生成可參考右邊的幫助文檔 要求各 tomcat 實(shí)例配置不能有重復(fù)的端口號(hào) 第一個(gè)連接器默認(rèn)監(jiān)聽8080端口,負(fù)責(zé)建立HTTP連接。在通過瀏覽器訪問Tomcat服務(wù)器的Web應(yīng)用時(shí),使用的就是這個(gè)連接器。 第二個(gè)連接器默認(rèn)監(jiān)聽8009端口,AJP端

    2024年02月09日
    瀏覽(21)
  • nginx 前后的分離 (ip/域名)訪問 負(fù)載均衡

    nginx 前后的分離 (ip/域名)訪問 負(fù)載均衡

    首先前端隨便訪問后端的一個(gè)端口,后端監(jiān)聽這個(gè)端口進(jìn)行服務(wù)轉(zhuǎn)發(fā)。 比如:8888 然后nginx在我們的服務(wù)器上部署兩個(gè)后端 這里我用docker部署了兩個(gè) 當(dāng)然你也可以在兩個(gè)服務(wù)器上面部署兩個(gè)后端,只要在nginx配置代理的時(shí)候修改一下ip就可以了。 nginx配置

    2024年04月29日
    瀏覽(32)
  • Linux/openEuler系統(tǒng)部署spring boot+vue前后端分離項(xiàng)目(nginx均衡代理)

    Linux/openEuler系統(tǒng)部署spring boot+vue前后端分離項(xiàng)目(nginx均衡代理)

    可以看我前面的文章 華為openEuler系統(tǒng)安裝openjdk并配置環(huán)境變量 openEuler系統(tǒng)安裝nginx HUAWEI-OpenEuler系統(tǒng)安裝MySQL服務(wù)器并使用詳細(xì)步驟 Ubuntu安裝MySQL服務(wù)器詳細(xì)步驟 在確定項(xiàng)目可以正常運(yùn)行的前提下,進(jìn)行package打出jar包 npm run build 打包成功后在項(xiàng)目文件路徑下出現(xiàn)dist文件夾

    2024年03月24日
    瀏覽(34)
  • nginx連接前后端分離項(xiàng)目 或 負(fù)載均衡映射多個(gè)服務(wù)器

    nginx連接前后端分離項(xiàng)目 或 負(fù)載均衡映射多個(gè)服務(wù)器

    nginx的兩種用法: 打通前后端項(xiàng)目,前后端分離的項(xiàng)目,通過nginx建立連接 負(fù)載均衡,一臺(tái)機(jī)器請(qǐng)求轉(zhuǎn)發(fā)至多個(gè)服務(wù)器 前端項(xiàng)目中的配置: 后端項(xiàng)目的ip和端口號(hào)就是正常的 下面看看nginx的配置文件: 將打包后的前端項(xiàng)目放這里: vue項(xiàng)目打包后會(huì)生成一個(gè)dist文件夾 放在服

    2024年02月05日
    瀏覽(23)
  • Nignx安裝&負(fù)載均衡&動(dòng)靜分離以及Linux前端項(xiàng)目部署&將域名映射到特定IP地址

    Nignx安裝&負(fù)載均衡&動(dòng)靜分離以及Linux前端項(xiàng)目部署&將域名映射到特定IP地址

    目錄 一、nginx簡(jiǎn)介 1.1 定義 1.2?背景 1.3?作用 二、nginx搭載負(fù)載均衡提供前后分離后臺(tái)接口數(shù)據(jù) 2.1 nginx安裝 2.1.1 下載依賴 2.1.2 下載并解壓安裝包 2.1.3 安裝nginx 2.1.4 啟動(dòng)nginx服務(wù) 2.2 tomcat負(fù)載均衡 2.2.1 負(fù)載均衡所需服務(wù)器準(zhǔn)備 2.2.2 配置修改 2.2.3 重啟nginx 2.2.4 效果展示 2.3 后端

    2024年02月05日
    瀏覽(27)
  • nginx負(fù)載均衡簡(jiǎn)介,一般輪詢、加權(quán)輪詢、ip_hash等負(fù)載均衡模式配置介紹

    nginx負(fù)載均衡簡(jiǎn)介,一般輪詢、加權(quán)輪詢、ip_hash等負(fù)載均衡模式配置介紹

    目錄 一.負(fù)載均衡含義簡(jiǎn)介 二.nginx負(fù)載均衡配置方式 準(zhǔn)備三臺(tái)設(shè)備: 2.190均衡服務(wù)器,2.191web服務(wù)器1,2.160web服務(wù)器2,三臺(tái)設(shè)備均安裝nginx,兩臺(tái)web服務(wù)器均有網(wǎng)頁(yè)內(nèi)容 upstream內(nèi)參數(shù) 1.一般輪詢負(fù)載均衡 (1)含義 (2)配置 (3)測(cè)試 2.加權(quán)輪詢負(fù)載均衡 (1)含義 (2)配置

    2024年02月10日
    瀏覽(25)
  • Nginx負(fù)載均衡以及keepalived高可用實(shí)驗(yàn)

    Nginx負(fù)載均衡以及keepalived高可用實(shí)驗(yàn)

    目錄 一、 Nginx負(fù)載均衡的標(biāo)準(zhǔn)和現(xiàn)象 二、什么是keepalived高可用 三、安裝 四、配置 五、測(cè)試 六、?難點(diǎn) 七、問題及處理 八、總結(jié) Nginx負(fù)載均衡通常具有以下標(biāo)準(zhǔn)和現(xiàn)象: 負(fù)載均衡算法:Nginx可以使用不同的負(fù)載均衡算法選擇服務(wù)器。默認(rèn)情況下,它使用輪詢算法,但也支

    2024年02月13日
    瀏覽(30)
  • Nginx反向代理配置+負(fù)載均衡集群部署

    Nginx反向代理配置+負(fù)載均衡集群部署

    什么是代理 正向代理既是通過代理服務(wù)器訪問外網(wǎng)資源,而反向代理與之相反是將局域網(wǎng)的資源通過反向代理服務(wù)器提供給互聯(lián)網(wǎng)用戶瀏覽和使用等。 實(shí)驗(yàn)環(huán)境圖 流量過程 當(dāng)客戶端發(fā)起請(qǐng)求后通過Internet (本實(shí)驗(yàn)為NAT網(wǎng)卡)來(lái)到代理服務(wù)器上,代理服務(wù)器經(jīng)算法選擇后調(diào)用

    2024年02月13日
    瀏覽(27)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包