1. Nginx installation steps 1.1 Official website introduction http://nginx.org/en/download.html 1.2 Upload the installation package Upload to the specified directory /usr/local/src 1.3 Unzip the Nginx compressed file 1. Move the installation directory to the specified file mv nginx-1.19.4.tar.gz software/ 2. Modify the file name mv nginx-1.19.4 nginx 1.4 About nginx directory description 1.5 Install nginx server Note: Execute the following command in the source file ./configure Direct results: make make install 1.6 nginx command description Description: nginx working directory description path: Order: 2. Linux commands: 1. Start command: ./nginx 2. Restart command: ./nginx -s reload 3. Shutdown command: ./nginx -s stop 1.7 Modify the nginx configuration file Requirements: Specific implementation: #Configure the image proxy server http://image.jt.com:80 server { listen 80; server_name image.jt.com; location / { #root D:/JT-SOFT/images; root /usr/local/src/images; } } #Configure the product backend server server{ listen 80; server_name manage.jt.com; location / { #Proxy real server address #proxy_pass http://localhost:8091; #Map to cluster #proxy_pass http://jtWindows; proxy_pass http://jtLinux; } } #Configure the tomcat server cluster 1. Default polling strategy 2. Weight strategy 3. ip_hash strategy upstream jtWindows { #ip_hash; down indicates downtime backup standby machine #max_fails=1 indicates the maximum number of failures #fail_timeout=60s If access is unsuccessful, the failed machine will not be accessed again within 60 seconds server 127.0.0.1:8081 max_fails=1 fail_timeout=60s; server 127.0.0.1:8082 max_fails=1 fail_timeout=60s; server 127.0.0.1:8083 max_fails=1 fail_timeout=60s; } upstream jtLinux { server 192.168.126.129:8081; server 192.168.126.129:8082; server 192.168.126.129:8083; } 1.8. Modify the hosts file Note: Since you did not purchase the domain name image/manage.jt.com, you need to modify the redirection through the hosts file. # Jingtao configuration 192.168.126.129 image.jt.com 192.168.126.129 manage.jt.com #IP domain name mapping relationship#127.0.0.1 image.jt.com #127.0.0.1 manage.jt.com 127.0.0.1 www.jt.com 127.0.0.1 sso.jt.com 127.0.0.1 localhost #bug missing the last letter issue 1.9 Effect display This is the end of this article about the steps to install Nginx on Linux. For more information about the steps to install Nginx on Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: mysql method to recursively search for all child nodes of a menu node
>>: JavaScript web page entry-level development detailed explanation
Table of contents Preface InnoDB storage architec...
<template> <div class="demo"&g...
This article example shares the specific code of ...
Table of contents Pull the rocketmq image Create ...
Docker download address: http://get.daocloud.io/#...
1. Use CSS to draw a small pointed-corner chat di...
Preface In MySQL, both Innodb and MyIsam use B+ t...
Table of contents Preface Architecture at a Glanc...
Preface Today, Prince will talk to you about the ...
background CVE-2021-21972 An unauthenticated comm...
Download MySQL-8.0.23 Click to download: mysql-8....
Demand background The project is made using Vue, ...
background As the business develops, the company&...
Table of contents 1. View the storage engine of t...
There are some issues that are not limited to Vue...