목차
Nginx 로드 스케줄러+ 듀얼 Tomcat 로드 및 세션 복제 + MySQL 백엔드 데이터베이스
[root@192 ~]#firewall-cmd --add-port=45564/udp --permanent
mysql> testdata에서 * 선택;
백엔드 개발 PHP 튜토리얼 Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스

Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스

Jul 07, 2018 pm 04:43 PM
mysql nginx tomcat

이 글에서는 주로 Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스를 소개합니다. 이제는 필요한 친구들이 참고할 수 있도록 공유합니다.

Nginx 로드 스케줄러+ 듀얼 Tomcat 로드 및 세션 복제 + MySQL 백엔드 데이터베이스

환경:

从nginx官网下载最新版
wget http://nginx.org/download/nginx-1.13.9.tar.gz
로그인 후 복사
[root@192 ~]# yum -y install pcre-devel zlib-devel gcc gcc-c++ make[root@192 ~]# cd /usr/src/nginx- 1.13.9/
IP Function
192.168.2.5 nginx
192.1 6 8.2.6 tomcat1
192.168. 2.7 tomcat2 080, 3306, selinux ② nginx 설치
[root@192 ~]# useradd -M -s /sbin/nologin nginx [root @192 ~]# tar zxf nginx-1.13.9.tar.gz -C /usr/src
[root@192 nginx -1.13.9]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module && make && make install

[root@192 ~]# ln - s /usr/local/nginx/sbin/nginx /usr/local/sbin

nginx를 시작하지 마세요

③설치용 Tomcat 호스트 두 개

jdk从官网下载需要许可,允许之后下载至本地,导入主机
tomcat从官网downloads找到tomcat7.0或者更高版本
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.86/bin/apache-tomcat-7.0.86.tar.gz
로그인 후 복사
[root@192 ~]# tar zxf jdk-7u65-linux -x64.gz -C /usr/src

[root@192 ~]# tar zxf apache-tomcat-7.0.54.tar.gz -C /usr/src

[root@192 ~]# mv jdk1.7.0_65/ /usr/local/java

[root@192 ~]# mv apache-tomcat-7.0.54/ /usr/local/tomcat7

[root@192 ~ ]# vim /etc/profile

export JAVA_HOME=/usr/local/java
export CATALINA_HOME=/usr/local/tomcat7
export PATH=$JAVA_HOME/bin:$CATALINA_HOME/bin:$PATH
로그인 후 복사
[root@192 ~]# 소스 /etc/profile

[root@192 ~]# java -version

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
로그인 후 복사
[root@192 ~]# catalina.sh 버전

Using CATALINA_BASE:   /usr/local/tomcat7
Using CATALINA_HOME:   /usr/local/tomcat7
Using CATALINA_TMPDIR: /usr/local/tomcat7/temp
Using JRE_HOME:        /usr/local/java
Using CLASSPATH:       /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.
Server built:   May 19 2014 10:26:15
Server number:  7.0.86.0
OS Name:        Linux
OS Version:     3.10.0-327.el7.x86_64
Architecture:   amd64
JVM Version:    1.7.0_65-b17
JVM Vendor:     Oracle Corporation
로그인 후 복사
Tomcat 시작

[root@192 ~] # /usr/local/tomcat7/bin/startup.sh

Using CATALINA_BASE:   /usr/local/tomcat7
Using CATALINA_HOME:   /usr/local/tomcat7
Using CATALINA_TMPDIR: /usr/local/tomcat7/temp
Using JRE_HOME:        /usr/local/java
Using CLASSPATH:       /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar
Tomcat started.
로그인 후 복사

테스트 접속

http://192.168.2.6:8080

http://192.168.2.7:8080

4두 개의 호스트에서 Tomcat 구성 파일 수정

[root@192 ~]#cd /usr/local/tomcat7/conf

[root@192 ~]#cp server.xml server.xml.bak

[root@192 ~ ]#vim server.xml

.......
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat-1">
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context docBase="/web/webapp1" path="" reloadable="true"/>
로그인 후 복사

[root@192 ~]#mkdir -p /web/webapp1

[root@192 ~]#vim /web/webapp1/index.jsp

<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
 <head>
<title>tomcat-1</title>
 </head>
<body>
 <h1><font color="red">Session serviced by tomcat</font></h1>
<table aligh="center" border="1">
<tr>
 <td>Session ID</td>
     <td><%=session.getId()%></td>
<% session.setAttribute("abc","abc");%>
      </tr>
<tr>
<td>Create on</td>
<td><%= session.getCreationTime() %></td>
</tr>
   </table>
</body>
</html>
로그인 후 복사
Tomcat 다시 시작

[root@ 192 ~]#shutdown.sh

[ root@192 ~]#startup.sh

참고: 두 번째 호스트는 server.xml의 jvmRoute="tomcat-2"와 tomcat-2</에서 다릅니다. title><p> in index.jsp <br></p>테스트 접속 결과 두 Tomcat 호스트의 세션 ID가 다른 것으로 나타나 준비 작업이 완료되었습니다<p></p>http://192.168.2.6:8080<p>http://192.168.2.7 :8008</p> <p>두 번째, 세션 공유 구성</p> <p>단계:</p> <p>①두 호스트가 세션 공유 클러스터 구성<br>[root@192 ~]#vim /usr/local/tomcat7/conf/server.xml<br></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">....... <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat-1">       <!--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"/>       -->       <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">          <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/>          <Channel className="org.apache.catal ina.tribes.group.GroupChannel">             <Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/>             <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="192.168.2.5" port="4000" autoBind="100" selectorTimeout="5000" maxThreads="6"/>             <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">               <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>             </Sender>             <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>             <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>           </Channel>           <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>           <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>   <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer" temDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/>   <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>       <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>     </Cluster>   <!-- 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">     <Context docBase="/web/webapp1" path="" reloadable="true"/></pre><div class="contentsignin">로그인 후 복사</div></div>[root@192 ~ ]#mkdir /web/webapp1/WEB-INF<p> <strong>[root@192 ~]#cp /usr/local/tomcat7/conf/web.xml WEB-INF/</strong></p>[root@192 ~]#vim WEB-INF /web.xml<p></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <distributable/>  #添加这个单词,必须有这一步,否则用户的session没法使用</pre><div class="contentsignin">로그인 후 복사</div></div> <blockquote>방화벽이 켜져 있으면 다음을 활성화하세요 <br> </blockquote> <h2 id="root-firewall-cmd-add-port-udp-permanent">[root@192 ~]#firewall-cmd --add-port=45564/udp --permanent</h2> <p></p>[root@192 ~]#firewall-cmd --add-port=4000/tcp --permanent<p> <br></p>[root@192 ~]#firewall-cmd --reload<p></p> <p>Tomcat 다시 시작</p>[root@192 ~]#shutdown.sh <p>[root@192 ~]#startup.sh</p> <p><em>참고: 두 Tomcat 구성은 동일합니다. 수신자 섹션에서 두 번째 호스트의 IP 주소를 가리키기만 하면 됩니다</em><br><em>②nginx 구성</em>[root@192 ~] #vim /usr/local/nginx/conf/nginx.conf<br></p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">....... http {  ....... upstream tomcat_server {         server 192.168.2.6:8080 weight=1;         server 192.168.2.7:8080 weight=1;   }     #gzip  on;     server {         listen       80;         server_name  localhost;         #charset koi8-r;         #access_log  logs/host.access.log  main;         location / {             root   html;             index  index.html index.htm;             proxy_pass http://tomcat_server;         }</pre><div class="contentsignin">로그인 후 복사</div></div> <em> nginx를 시작하고 nginx 주소를 방문한 후 페이지를 새로 고쳐 액세스를 테스트하세요 </em><br>[root@192 ~]#nginx<em></em>http://192.168.2.5 <p>3. mysql 데이터베이스에 연결합니다. <br><br>단계: </p> <p>1mysql을 데이터베이스 서버로 사용하고 mysql을 구성합니다. <strong>mysql>다음으로 식별되는 </strong>.</p>에 대한 모든 권한을 부여합니다. '123.com';<p><br>mysql> 데이터베이스 생성 javatest</p> <p>mysql>javatest</p> 사용 <p>mysql>테이블 testdata 생성(id int not null auto_increment 기본 키,foo varchar(25),bar varchar(10));</p> <blockquote> mysql>testdata(foo,bar) 값에 삽입('hello','123.com ') </blockquote> <h2 id="mysql-gt-testdata에서-선택">mysql> testdata에서 * 선택;</h2> <p>②下载mysql-connector-java-5.1.22-bin.jar 复制到tomcat7/lib/目录下(两台tomcat都需要配置)<br>[root@192 ~]# cp mysql-connector-java-5.1.22-bin.jar /usr/local/tomcat7/lib/</p> <p>③配置context.xml<br>[root@192 ~]# cp /usr/local/tomcat7/conf/context.xml /usr/local/tomcat7/conf/context.xml.bak</p> <p>[root@192 ~]# vim /usr/local/tomcat7/conf/context.xml</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><Context>     <!-- Default set of monitored resources -->     <WatchedResource>WEB-INF/web.xml</WatchedResource>     <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="javauser" password="123.com" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://192.168.2.8:3306/javatest"/></pre><div class="contentsignin">로그인 후 복사</div></div> <p>④配置web.xml<br>[root@192 ~]# vim /web/webapp1/web.xml</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">...... <distributable/> <description>MySQL Test App</description>  <resource-ref>     <description>DB Connection</description>     <res-ref-name>jdbc/TestDB</res-ref-name>     <res-type>javax.sql.DataSource</res-type>     <res-auth>Container</res-auth>  </resource-ref></pre><div class="contentsignin">로그인 후 복사</div></div> <p>⑤编写连接数据库jsp文件<br>[root@192 ~]# vim /web/webapp1/test.jsp</p> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><%@ page language="java" import="java.sql.*" pageEncoding="GB2312"%> <html>   <head>     <title>MySQL</title>   </head> <body> connect MySQL<br> <% String driverClass="com.mysql.jdbc.Driver"; String url="jdbc:mysql://192.168.2.8:3306/javatest"; String username = "javauser"; String password = "123.com"; Class.forName(driverClass); Connection conn=DriverManager.getConnection(url, username, password); Statement stmt=conn.createStatement(); ResultSet rs = stmt.executeQuery("select * from testdata"); while(rs.next()){  out.println("<br>foo:"+rs.getString(2)+"bar:"+rs.getString(3)); } rs.close(); stmt.close(); conn.close(); %> </body></html></pre><div class="contentsignin">로그인 후 복사</div></div> <p>⑥重启tomcat,测试连接<br>[root@192 ~]# shutdown.sh<br>[root@192 ~]# startup.sh</p> <blockquote>http://192.168.2.5/test.jsp</blockquote> <p>以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!</p> <p>相关推荐:</p> <p class="comments-box-content"><a title="ThinkPHP5.0 Linux Apache/Nginx重写URL配置" href="http://www.php.cn/php-weizijiaocheng-406204.html" target="_blank">ThinkPHP5.0 Linux Apache/Nginx重写URL配置</a><br></p> <p class="mt20 ad-detail-mm hidden-xs"><a title="使用cronolog切割nginx访问日志,定时清理旧日志" href="http://www.php.cn/php-weizijiaocheng-406203.html" target="_blank">使用cronolog切割nginx访问日志,定时清理旧日志</a><br></p><p>위 내용은 Nginx 로드 스케줄러 + 듀얼 Tomcat 로드 및 세션 공유 + MySQL 백엔드 데이터베이스의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!</p> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">본 웹사이트의 성명</div> <div>본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.</div> </div> </div> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="2507867629"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="AI_ToolDetails_main4sR"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5902227090019525" data-ad-slot="3653428331" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>인기 기사</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785841.html" title="어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796789525.html" title="Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법" class="phpgenera_Details_mainR4_bottom_title">Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785857.html" title="Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다" class="phpgenera_Details_mainR4_bottom_title">Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796781206.html" title="R.E.P.O. 저축 설명 (및 파일 저장)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. 저축 설명 (및 파일 저장)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796783009.html" title="어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>핫 AI 도구</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>사실적인 누드 사진을 만들기 위한 AI 기반 앱</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>사진에서 옷을 제거하는 온라인 AI 도구입니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>무료로 이미지를 벗다</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>AI 옷 제거제</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173405034393877.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Hentai Generator" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_title"> <h3>AI Hentai Generator</h3> </a> <p>AI Hentai를 무료로 생성하십시오.</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>인기 기사</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785841.html" title="어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796789525.html" title="Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법" class="phpgenera_Details_mainR4_bottom_title">Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785857.html" title="Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다" class="phpgenera_Details_mainR4_bottom_title">Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796781206.html" title="R.E.P.O. 저축 설명 (및 파일 저장)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. 저축 설명 (및 파일 저장)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796783009.html" title="어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>뜨거운 도구</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/92" title="메모장++7.3.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="메모장++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/92" title="메모장++7.3.1" class="phpmain_tab2_mids_title"> <h3>메모장++7.3.1</h3> </a> <p>사용하기 쉬운 무료 코드 편집기</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/93" title="SublimeText3 중국어 버전" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 중국어 버전" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/93" title="SublimeText3 중국어 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 중국어 버전</h3> </a> <p>중국어 버전, 사용하기 매우 쉽습니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/121" title="스튜디오 13.0.1 보내기" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="스튜디오 13.0.1 보내기" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/121" title="스튜디오 13.0.1 보내기" class="phpmain_tab2_mids_title"> <h3>스튜디오 13.0.1 보내기</h3> </a> <p>강력한 PHP 통합 개발 환경</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 CS6" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="드림위버 CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 CS6" class="phpmain_tab2_mids_title"> <h3>드림위버 CS6</h3> </a> <p>시각적 웹 개발 도구</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/500" title="SublimeText3 Mac 버전" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac 버전" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/500" title="SublimeText3 Mac 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac 버전</h3> </a> <p>신 수준의 코드 편집 소프트웨어(SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>뜨거운 주제</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/gmailyxdlrkzn" title="Gmail 이메일의 로그인 입구는 어디에 있나요?" class="phpgenera_Details_mainR4_bottom_title">Gmail 이메일의 로그인 입구는 어디에 있나요?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>7564</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>15</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/cakephp-tutor" title="Cakephp 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">Cakephp 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1386</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>52</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/steamdzhmcssmgs" title="Steam의 계정 이름 형식은 무엇입니까?" class="phpgenera_Details_mainR4_bottom_title">Steam의 계정 이름 형식은 무엇입니까?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>87</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>11</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/winactivationkeyper" title="Win11 활성화 키 영구" class="phpgenera_Details_mainR4_bottom_title">Win11 활성화 키 영구</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>61</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>19</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/newyorktimesdailybrief" title="NYT 연결 힌트와 답변" class="phpgenera_Details_mainR4_bottom_title">NYT 연결 힌트와 답변</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>28</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>100</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/faq/zt">더보기</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div class="phpmain1_2_top"> <a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img src="/static/imghw/index2_title2.png" alt="" /></a> </div> <div class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796050.html" title="nginx가 시작되었는지 확인하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202405/27/2024052716572733654.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="nginx가 시작되었는지 확인하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/1796796050.html" title="nginx가 시작되었는지 확인하는 방법" class="phphistorical_Version2_mids_title">nginx가 시작되었는지 확인하는 방법</a> <span class="Articlelist_txts_time">Apr 14, 2025 pm 01:03 PM</span> <p class="Articlelist_txts_p">nginx가 시작되었는지 확인하는 방법 : 1. 명령 줄을 사용하십시오 : SystemCTL 상태 nginx (linux/unix), netstat -ano | Findstr 80 (Windows); 2. 포트 80이 열려 있는지 확인하십시오. 3. 시스템 로그에서 nginx 시작 메시지를 확인하십시오. 4. Nagios, Zabbix 및 Icinga와 같은 타사 도구를 사용하십시오.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796035.html" title="Nginx에서 클라우드 서버 도메인 이름을 구성하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202405/27/2024052718152785599.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Nginx에서 클라우드 서버 도메인 이름을 구성하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/1796796035.html" title="Nginx에서 클라우드 서버 도메인 이름을 구성하는 방법" class="phphistorical_Version2_mids_title">Nginx에서 클라우드 서버 도메인 이름을 구성하는 방법</a> <span class="Articlelist_txts_time">Apr 14, 2025 pm 12:18 PM</span> <p class="Articlelist_txts_p">클라우드 서버에서 nginx 도메인 이름을 구성하는 방법 : 클라우드 서버의 공개 IP 주소를 가리키는 레코드를 만듭니다. Nginx 구성 파일에 가상 호스트 블록을 추가하여 청취 포트, 도메인 이름 및 웹 사이트 루트 디렉토리를 지정합니다. Nginx를 다시 시작하여 변경 사항을 적용하십시오. 도메인 이름 테스트 구성에 액세스하십시오. 기타 참고 : HTTPS를 활성화하려면 SSL 인증서를 설치하고 방화벽에서 포트 80 트래픽을 허용하고 DNS 해상도가 적용되기를 기다립니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796024.html" title="nginx 버전을 확인하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202405/27/2024052718421863107.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="nginx 버전을 확인하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/1796796024.html" title="nginx 버전을 확인하는 방법" class="phphistorical_Version2_mids_title">nginx 버전을 확인하는 방법</a> <span class="Articlelist_txts_time">Apr 14, 2025 am 11:57 AM</span> <p class="Articlelist_txts_p">nginx 버전을 쿼리 할 수있는 메소드는 다음과 같습니다. nginx -v 명령을 사용하십시오. nginx.conf 파일에서 버전 지시문을 봅니다. nginx 오류 페이지를 열고 페이지 제목을 봅니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796038.html" title="nginx 서버를 시작하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202405/27/2024052718003583880.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="nginx 서버를 시작하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/1796796038.html" title="nginx 서버를 시작하는 방법" class="phphistorical_Version2_mids_title">nginx 서버를 시작하는 방법</a> <span class="Articlelist_txts_time">Apr 14, 2025 pm 12:27 PM</span> <p class="Articlelist_txts_p">Nginx 서버를 시작하려면 다른 운영 체제에 따라 다른 단계가 필요합니다. Linux/Unix System : Nginx 패키지 설치 (예 : APT-Get 또는 Yum 사용). SystemCTL을 사용하여 nginx 서비스를 시작하십시오 (예 : Sudo SystemCtl start nginx). Windows 시스템 : Windows 바이너리 파일을 다운로드하여 설치합니다. nginx.exe 실행 파일을 사용하여 nginx를 시작하십시오 (예 : nginx.exe -c conf \ nginx.conf). 어떤 운영 체제를 사용하든 서버 IP에 액세스 할 수 있습니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796045.html" title="nginx가 시작되었는지 확인하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202405/27/2024052717272222653.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="nginx가 시작되었는지 확인하는 방법은 무엇입니까?" /> </a> <a href="https://www.php.cn/ko/faq/1796796045.html" title="nginx가 시작되었는지 확인하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_title">nginx가 시작되었는지 확인하는 방법은 무엇입니까?</a> <span class="Articlelist_txts_time">Apr 14, 2025 pm 12:48 PM</span> <p class="Articlelist_txts_p">Linux에서는 다음 명령을 사용하여 nginx가 시작되었는지 확인하십시오. SystemCTL 상태 Nginx 판사 명령 출력에 따라 : "active : running"이 표시되면 Nginx가 시작됩니다. "Active : 비활성 (죽음)"이 표시되면 Nginx가 중지됩니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796046.html" title="Linux에서 Nginx를 시작하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202405/27/2024052717242017066.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Linux에서 Nginx를 시작하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/1796796046.html" title="Linux에서 Nginx를 시작하는 방법" class="phphistorical_Version2_mids_title">Linux에서 Nginx를 시작하는 방법</a> <span class="Articlelist_txts_time">Apr 14, 2025 pm 12:51 PM</span> <p class="Articlelist_txts_p">Linux에서 Nginx를 시작하는 단계 : Nginx가 설치되어 있는지 확인하십시오. systemctl start nginx를 사용하여 nginx 서비스를 시작하십시오. SystemCTL을 사용하여 NGINX를 사용하여 시스템 시작시 NGINX의 자동 시작을 활성화하십시오. SystemCTL 상태 nginx를 사용하여 시작이 성공했는지 확인하십시오. 기본 환영 페이지를 보려면 웹 브라우저의 http : // localhost를 방문하십시오.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796613.html" title="Docker에서 거울을 만드는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202406/05/2024060506092018511.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Docker에서 거울을 만드는 방법" /> </a> <a href="https://www.php.cn/ko/faq/1796796613.html" title="Docker에서 거울을 만드는 방법" class="phphistorical_Version2_mids_title">Docker에서 거울을 만드는 방법</a> <span class="Articlelist_txts_time">Apr 15, 2025 am 11:27 AM</span> <p class="Articlelist_txts_p">Docker 이미지 생성 단계 : 빌드 지침이 포함 된 Dockerfile을 작성하십시오. Docker 빌드 명령을 사용하여 터미널에 이미지를 빌드하십시오. Docker 태그 명령을 사용하여 이미지를 태그하고 이름과 태그를 지정하십시오.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796796173.html" title="Centos 설치 MySQL" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202412/20/2024122012183274031.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Centos 설치 MySQL" /> </a> <a href="https://www.php.cn/ko/faq/1796796173.html" title="Centos 설치 MySQL" class="phphistorical_Version2_mids_title">Centos 설치 MySQL</a> <span class="Articlelist_txts_time">Apr 14, 2025 pm 08:09 PM</span> <p class="Articlelist_txts_p">Centos에 MySQL을 설치하려면 다음 단계가 필요합니다. 적절한 MySQL Yum 소스 추가. mysql 서버를 설치하려면 yum install mysql-server 명령을 실행하십시오. mysql_secure_installation 명령을 사용하여 루트 사용자 비밀번호 설정과 같은 보안 설정을 작성하십시오. 필요에 따라 MySQL 구성 파일을 사용자 정의하십시오. MySQL 매개 변수를 조정하고 성능을 위해 데이터베이스를 최적화하십시오.</p> </div> </div> <a href="https://www.php.cn/ko/be/" class="phpgenera_Details_mainL4_botton"> <span>See all articles</span> <img src="/static/imghw/down_right.png" alt="" /> </a> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!</p> </div> <div class="footermid"> <a href="https://www.php.cn/ko/about/us.html">회사 소개</a> <a href="https://www.php.cn/ko/about/disclaimer.html">부인 성명</a> <a href="https://www.php.cn/ko/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1745023843"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> </body> </html>