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

  • How to configure the multi-site function of WordPress in Nginx environment
    How to configure the multi-site function of WordPress in Nginx environment
    The multi-site function of wordpress allows multiple sites to be implemented by installing a wordpress program (that is, a set of programs can be bound to multiple domain names or sub-domain names). Each site has independent themes, plug-ins, articles and pages. This can greatly reduce the trouble of maintaining and updating multiple WordPress installation programs, and each site can be independent of each other without affecting each other. WordPress Multisite has two methods: subdirectory and subdomain name. Here we mainly introduce the subdomain name method. That is to say, based on the main domain name, we will create a subdomain name, for example: http://shop.jb51.com. At the same time, we can map this
    Nginx 1963 2023-05-12 09:58:15
  • How to set the number of Nginx server processes and how to utilize multi-core CPU
    How to set the number of Nginx server processes and how to utilize multi-core CPU
    The nginx configuration file nginx.conf first needs to find the nginx configuration file nginx.conf to perform the following operations. Under the default configuration of the lnmp one-click installation package, nginx.conf is stored in /usr/local/nginx/conf/nginx.conf. To install nginx in other environments, you can use find/-namenginx.conf to find the storage path of the configuration file. nginxworker_processes process number setting nginx configuration document nginx.conf can set worker_processes to change the number of nginx processes. According to this
    Nginx 2077 2023-05-12 09:46:05
  • How to disable unnecessary HTTP methods in Nginx server
    How to disable unnecessary HTTP methods in Nginx server
    Disable unnecessary HTTP methods such as some web sites and applications, which can only support GET, POST and HEAD methods. Adding the following method to the server module in the configuration file can prevent some spoofing attacks if($request_method!~^(GET|HEAD|POST)$){return444;}
    Nginx 1411 2023-05-12 09:40:12
  • How to solve nginx php file not executing time
    How to solve nginx php file not executing time
    Step 1: View the current PHP execution time settings Before you start adjusting Nginx’s PHP execution time, you need to understand the current settings. You can check the current PHP execution time settings by executing the following command: php -i|grep "max_execution_time" This will output the current PHP execution time limit. By default, it is set to 30 seconds. Step 2: Modify the PHP execution time settings in Nginx To change the PHP execution time settings in Nginx, you need to edit the Nginx website configuration file. In this example, we assume that your Nginx site configuration files are located in /etc/nginx/sites-
    Nginx 1158 2023-05-12 09:34:06
  • How to install and configure Windows nginx
    How to install and configure Windows nginx
    What is nginx? nginx (enginex) is a lightweight web server, reverse proxy server and email (imap/pop3) proxy server. What is a reverse proxy? The reverse proxy method refers to using a proxy server to accept connection requests on the Internet, then forwarding the requests to the server on the internal network, and returning the results obtained from the server to the client requesting the connection on the Internet. When the proxy server appears to the outside world as a reverse proxy server. Please refer to the example in the figure below: Installation and Use Installation nginx official website download address The release version is divided into linux and windows versions. You can also download the source code
    Nginx 1054 2023-05-12 09:22:05
  • How to solve the problem of Nginx starting automatically in Centos7
    How to solve the problem of Nginx starting automatically in Centos7
    Regarding setting nginx to start automatically at boot in centos7, we can solve the problem by writing a self-start shell script at boot. Test environment operating system: centos764-bit 1611nginx version: 1.11.10 Configuration parameters during native nginx installation./configure\--prefix=/usr/local/nginx\--pid-path=/usr/local/nginx/logs /nginx.pid\--lock-path=/var/lock/nginx.lock\--error-log-path=/var/log/nginx/err
    Nginx 1053 2023-05-12 09:16:05
  • What are the main application scenarios of Nginx?
    What are the main application scenarios of Nginx?
    What Nginx can do 1. Reverse proxy 2. Load balancing 3. HTTP server (including dynamic and static separation) 4. Forward proxy The above is what I know about what Nginx can handle without relying on third-party modules. Each type is explained in detail below. Function How to do reverse proxy Reverse proxy should be the most common thing Nginx does. What is a reverse proxy? The following is what Baidu Encyclopedia says: The reverse proxy (ReverseProxy) method refers to using a proxy server to accept the Internet. The connection request is made on the Internet, and then the request is forwarded to the server on the internal network, and the result obtained from the server is returned to the client requesting the connection on the Internet. At this time, the proxy server appears as a reverse proxy service to the outside world.
    Nginx 2022 2023-05-12 09:07:11
  • How to add mp4 streaming support to Nginx
    How to add mp4 streaming support to Nginx
    Download and copy the code as follows: #Download and decompress wgetwgettarzxfnginx_mod*.tar.gz configuration and add the copy code as follows: #View compilation parameters/usr/local/nginx/sbin/nginx-v#Enter the nginx (tengine) source code directory cdtengine*./ configure--add-module=../nginx_mod_h264_streaming-2.2.7\--user=www--group=www\--prefix=/usr/local/nginx\--with-pcre#Just mak
    Nginx 2168 2023-05-12 09:07:05
  • How to install Nginx in Linux
    How to install Nginx in Linux
    Prepare to install tools\1. Download Nginx from the Nginx official website. The version used here is: 1.13.6.\2. Upload the downloaded Nginx to Linux. Here, the /opt/nginx directory is used as an example. Run "tar-zxvfnginx-1.13.6.tar.gz" to decompress. \3. Switch to the /opt/nginx/nginx-1.13.6 directory and run ./configure for initial configuration. If the following prompt appears, it means that PCRE is not installed on the machine, and Nginx needs to rely on PCRE. PCRE needs to be installed manually. You can search and view it in the forum. Hands-on installation of pcrePCRE (PerlCo
    Nginx 1729 2023-05-12 09:04:15
  • How to compile and install PHP and Nginx in Ubuntu
    How to compile and install PHP and Nginx in Ubuntu
    Compile and install nginx, change directory to working folder: cd/usr/local/src, download pcre source code and install wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.20.tar .gztar-zxvfpcre2-10.20.tar.gzmv./pcre2-10.20.tar.gz./pcrecdpcre./configure--prefix=/usr/local/pcremake&&makeinstall download zlib
    Nginx 1250 2023-05-12 08:58:05
  • How to combine nginx with keepalived to achieve high availability
    How to combine nginx with keepalived to achieve high availability
    Introduction to keepalived The function of keepalived is to detect the status of the server. If a web server is down or the work fails, keepalived will detect it and remove the faulty server from the system, and use other servers to replace the server's work. , when the server is working normally, keepalived will automatically add the server to the server group. All these tasks are completed automatically without manual intervention. All that needs to be done manually is to repair the faulty server. System architecture diagram implementation steps 1. Environment configuration 1.1 Install nginx and install related dependencies yuminstallpcre-develzlibzlib-developenssl
    Nginx 1232 2023-05-12 08:43:11
  • How to configure multi-port and multi-domain name access in Nginx
    How to configure multi-port and multi-domain name access in Nginx
    For multi-port access to the main domain name, set a record in dnsnameserver to point to the server IP and open the required port. Modify the nginx configuration file. For example, we have two services open to port 80 and port 8080. If there is iptable, open the port first: iptables-ainput-ptcp --dport80-jacceptiptables-ainput-ptcp--dport8080-jacceptModify the configuration file: #path:/usr/local/nginx/conf/nginx.confserver{listen80;server_namewww.xxx
    Nginx 1776 2023-05-12 08:43:05
  • How to disable server_tokens item in Nginx configuration
    How to disable server_tokens item in Nginx configuration
    Disabling the server_tokens item in the Nginx configuration will cause the 404 page to display the current version number of Nginx when server_tokens is turned on. This is clearly unsafe as hackers could use this information to try vulnerabilities in the corresponding Nginx version. You only need to set server_tokensoff in the http module in nginx.conf, for example: server{listen192.168.0.25:80;Server_tokensoff;server_nametecmintlovesnginx.comwww.tecmintlovesnginx.com;a
    Nginx 3111 2023-05-12 08:37:21
  • How to solve the problem of 503 after nginx proxy
    How to solve the problem of 503 after nginx proxy
    Problem: After configuring serve_name and adding the corresponding mapping in hosts, it does not take effect after restarting nginx. Solution: 1. Whether serve_name is set or not, after starting nginx, it can be accessed through localhost or windows10.microdone.cn; 2. According to this problem, check the network configuration: Operation steps: 1), win+r, enter regedit; 2), check the registry: Computer\HKEY__CURRENT__USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings
    Nginx 4852 2023-05-12 08:34:21
  • How to configure nginx gzip dynamic compression and static compression
    How to configure nginx gzip dynamic compression and static compression
    Dynamic compression Dynamic compression actually means that the nginx server compresses the compiled creation. You need to enable the following configuration in the http and https modules of nginx.conf: gzipon; #Enable gizo compression gzip_min_length1k; #gizp compression starting point, only if the file is larger than 1k Compression gzip_comp_level6;#The larger the compression level number, the smaller the compression, but the more performance consumption depends on the actual situation gzip_proxiedany;#Enabled when nginx is used as a reverse proxy. For details, see the official documentation: http://nginx.org/en/docs /http/ngx_http_gzip
    Nginx 2707 2023-05-12 08:25:23

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!