current location:Home > Technical Articles > Operation and Maintenance > Nginx

  • How to install, deploy and use nginx on linux
    How to install, deploy and use nginx on linux
    1. Download 2. Deployment 2.1 Installation prerequisites To install under Linux, you need to install the following components 1.gcc&&g++yuminstallgcc-c++2.pcreyuminstall-ypcrepcre-devel3.zlibyuminstall-yzlibzlib-devel4.opensslyuminstall-yopensslopenssl-devel2.2 Installation 1 .Unzip the nginx file tar-zxvfnginx-1.17.5.tar.gz2.Installation ##Create an nginx installation directory mkdirnginxcdngin
    Nginx 1314 2023-05-24 15:22:06
  • How to configure multiple WeChat under Nginx reverse proxy port 80
    How to configure multiple WeChat under Nginx reverse proxy port 80
    Detailed explanation of configuring multiple WeChat projects under nginx reverse proxy port 80. If we want to access the WeChat public account platform for development, we need to fill in the server configuration, and then implement the business logic according to the interface document. However, the WeChat official account interface only supports interface 80 (port 80). Due to business needs, we need to publish two projects that require WeChat authorization under one official account domain name. What should we do? We can use nginx server as a reverse proxy to solve this problem. The nginx server externally accesses port 80, and then accesses different projects internally based on different url parameters. The nginx configuration is as follows: Open /usr/local/nginx/conf/nginx.confworke
    Nginx 1506 2023-05-24 14:58:06
  • Analysis of location configuration examples in Nginx server
    Analysis of location configuration examples in Nginx server
    First, let me briefly introduce the types of location and matching rules, using the example of nginxwiki as an example: location=/{#matchesthequery/only.[configurationa]}location/{#matchesanyquery,sinceallqueriesbeginwith/,butregular#expressionsandanylongerconventionalblockswillbe#matchedfirst.[ configurationb]}location^~/im
    Nginx 1058 2023-05-24 14:05:22
  • How to view the nginx installation directory in Linux system
    How to view the nginx installation directory in Linux system
    1. Check the nginx installation directory ps-ef|grepnginx 2. Check the configuration file nginx.conf path nginx-t This command can also be used to check whether the configuration file is correct. Of course, you can also use the find command to search for files #Find the file named nginx.conf from the /root directory find/-namenginx.conf #Find the file named nginx.conf from the /etc directory find/etc-namenginx .conf What versions of Linux are there? The versions of Linux are: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ub
    Nginx 17536 2023-05-24 13:40:07
  • How to configure Nginx's socket forwarding port
    How to configure Nginx's socket forwarding port
    Common scenarios for nginx forwarding socket ports: In online learning applications, in addition to regular functions, a chat room function is added. The back-end selects swoole as a service provider. At the same time, the front-end does not want to directly link to the service in ip:port mode, so nginx needs to be used for forwarding. Under normal circumstances, we can directly establish a socket link on the user page, but such an operation will expose the port and bring certain security risks. Using nginx for forwarding can hide the port. An additional problem is that some header parameters also need to be brought to the socket service provider during the forwarding process. Others only need nginx to process the conversion from the regular protocol to websocket. Among them, &qu
    Nginx 2515 2023-05-24 11:37:06
  • How to set up macbook nginx php environment
    How to set up macbook nginx php environment
    Step 1: Install Homebrew Homebrew is a very easy-to-use software installation package manager under MacOSX. It allows developers to easily install various development programs, such as PHP, MySQL, etc. Enter the following command in the terminal to install Homebrew: /usr/bin/ruby –e "$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)" After the installation is successful, you can check it with the following command Whether the installation is successful: brew-v outputs the version number to prove that Homebrew has been successfully installed.
    Nginx 1906 2023-05-24 11:16:48
  • What is the reason why nginx php reports 502 error and how to solve it
    What is the reason why nginx php reports 502 error and how to solve it
    1. What is a 502 error? In short, when you visit a website page, if the page displays "502 Gateway Error", it means that your request cannot be accepted or processed, and the corresponding request cannot be completed. In most cases, it is because Nginx cannot handle the request from PHP. Caused by the FastCGI process getting the corresponding response. 502 error is one of the common HTTP errors, especially when using Nginx server as a reverse proxy server. When it occurs, the user is shown an error page stating that the request has been received by the server, but for some reason the server was unable to Respond to requests correctly. 2. The reason for the 502 error is that the PHP-FPM connection to the Nginx reverse proxy failed.
    Nginx 4475 2023-05-24 10:39:07
  • How to use Centos7.3 to install and deploy Nginx and configure https
    How to use Centos7.3 to install and deploy Nginx and configure https
    Installation environment 1.gcc installation To install nginx, you need to compile the source code downloaded from the official website first. Compilation depends on the gcc environment: yuminstallgcc-c++2.pcrepcre-devel installation pcre-devel is a secondary development library developed using pcre. : yuminstall-ypcrepcre-devel3.zlib Installing the zlib library provides many compression and decompression methods. nginx can use zlib to gzip the contents of the http package: yuminstall-yzlibzlib-devel4.openssl Install a strong secure socket layer password library, has the main password
    Nginx 987 2023-05-24 08:37:12
  • How to install and configure nginx under Linux
    How to install and configure nginx under Linux
    1. Install and configure nginx under Linux. When installing nginx for the first time, solve the problems step by step. Use the tool securecrt to connect and log in to the server. 1.1rz command, a dialog box will pop up, select the nginx compressed package to upload. #rz1.2 Unzip [root@vw010001135067~]#cd/usr/local/[root@vw010001135067local]#tar-zvxfnginx-1.10.2.tar.gz1.3 Enter the nginx folder and execute the ./configure command [root@ vw010001135067local]#c
    Nginx 3829 2023-05-23 23:22:04
  • What are nginx smooth restart and FPM smooth restart?
    What are nginx smooth restart and FPM smooth restart?
    Graceful restart GR is the abbreviation of Graceful Restart. It is a mechanism to ensure that forwarding services are not interrupted when the protocol is restarted. The core of the GR mechanism is that when a device restarts the protocol, it can notify its surrounding devices to maintain stable neighbor relationships and routes to the device within a certain period of time. After the protocol is restarted, peripheral devices assist it in synchronizing information (including various topology, routing and session information maintained by routing/MPLS-related protocols that support GR), so that the device can be restored to the state before the restart in the shortest possible time. state. There will be no route flapping during the entire protocol restart process, and there will be no change in the packet forwarding path. The entire system can forward data without interruption. This process is called a smooth restart.
    Nginx 1529 2023-05-23 21:08:43
  • How to ban specified IPs and foreign IPs from accessing the website based on Nginx
    How to ban specified IPs and foreign IPs from accessing the website based on Nginx
    There are many ways to use Nginx to prohibit specified IPs and foreign IPs from accessing my website. There are many ways to achieve this function. Next, I will introduce the ngx_http_geoip2 module based on Nginx to prohibit foreign IPs from accessing the website. ①Install the geoip2 extension dependency: [root@fxkj~]#yuminstalllibmaxminddb-devel-y ②Download the ngx_http_geoip2_module module: [root@fxkjtmp]#gitclonehttps://github.com/leev/ngx_http_geoip2_module.git[rotmp]#③Unzip
    Nginx 2030 2023-05-23 19:13:43
  • How to solve Chinese garbled characters on nginx home page
    How to solve Chinese garbled characters on nginx home page
    The solution is to insert charsetutf-8; or charset'utf-8';server{listen80;server_namelocalhost;charsetutf-8;#access_loglogs/host.access.logmain; in the /usr/local/nginx/conf/nginx.conf configuration file) location/{roothtml;indexindex.htmlindex.htm;} or server{listen80;server_name
    Nginx 2454 2023-05-23 19:10:04
  • Analysis of Tomcat7 Nginx Redis configuration example under CentOS6.5
    Analysis of Tomcat7 Nginx Redis configuration example under CentOS6.5
    All configurations are completed on one machine, and the deployment topology information is as follows: Note: Since the redis configuration is strict on the jar package and tomcat version, be sure to use tomcat7 and the jar package provided in this article. Download address: http://pan.baidu.com/s/1bo67kytomcat:tomcat1localhost:8080tomcat2localhost:9080nginx:localhost:1210redis:localhost:63791. Tomcat installation and configuration 1. In the server.xml file, modify the port of tomcat2, Total needed
    Nginx 933 2023-05-23 18:49:12
  • How to install nginx1.10.1 reverse proxy in Windows to access IIS website
    How to install nginx1.10.1 reverse proxy in Windows to access IIS website
    First, go to the official website to download the software package and unzip it. It is best not to have the path problem with the Chinese nginx configuration. Under Windows, the file path can be separated by "\", "\\", or "/". symbol. But "\" is the most likely to cause problems, so try to avoid using it. Do not add path, otherwise it will cause an error. The config file path cannot be found. For example, I decompressed the cmd command on the e drive to locate the folder where nginx.exe is located, cde:\worksoftware\nginx-1.10.1 and then execute it. First ensure the nginx.conf file There is no problem with the configuration. In fact, the most important and main job of nginx is the configuration file, and there is nothing else.
    Nginx 2012 2023-05-23 17:40:06
  • How to set a third-level domain name in nginx
    How to set a third-level domain name in nginx
    Problem description: By configuring nginx, you can set up an IP address to access different web applications through different ports. However, after a long time, the relationship between the port number and the application becomes blurred. For example, http://120.79.79.xx:9001 and foreign.xxx.xin. Although these two URLs point to the same website, the latter is obviously meaningless and much better than the former. At the same time, in website SEO, the latter also has a higher weight than the former. Basic knowledge top-level domain name: .com.cn second-level domain name: baidu.comsina.com, among which baidu and sina are the second-level domain names; third-level domain name: zhidao.baidu.com among which zhi
    Nginx 1900 2023-05-23 17:31:06

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!