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

  • What are the main application scenarios in Nginx?
    What are the main application scenarios in Nginx?
    The main application scenarios of Nginx are static website deployment. Nginx is an http web server that can return static files (html, css, pictures) on the server to the browser client through the HTTP protocol. Example: We deploy a static resource index.html on the server and upload index.html to linux/opt/www/test. Modify nginx.conf to add a location to intercept requests for /test. The /opt/www path corresponding to root represents the root. Path, that is, the /slash before /test location/test{root/opt/www;indexinde
    Nginx 1614 2023-05-16 14:55:17
  • How to implement Nginx proxy output zoom image
    How to implement Nginx proxy output zoom image
    nginx配置文件:#documentpptconvertconfiguration.upstreamdocument.polyv.net{server127.0.0.1:8080;}server{listen80;server_namedocument.polyv.net;indexindex.htmlindex.htm;charsetutf-8;client_max_body_size1000m;#ignorefavicon.iconotexist.location=/favicon.ico
    Nginx 772 2023-05-16 13:55:06
  • What is the difference between unix socket and tcp socket in Nginx
    What is the difference between unix socket and tcp socket in Nginx
    There are two ways for Nginx to connect to fastcgi: unixdomainsocket and TCP. Unixdomainsocket or IPCsocket is a terminal that enables data communication between two or more processes on the same operating system. Compared with pipes, Unixdomainsockets can use both byte streams and data queues, while pipe communication can only pass through byte streams. The interface of Unixdomainsockets is very similar to Internetsockets, but it does not use the underlying network protocol to communicate. The function of Unixdomainsocket is a component in the POSIX operating system. TCP and unixd
    Nginx 1902 2023-05-16 13:37:06
  • How nginx+tomcat achieves load balancing under Windows system
    How nginx+tomcat achieves load balancing under Windows system
    First, install two tomcats. You can copy the same one into two, or you can download two different versions of tomcat. I downloaded two different versions. (This is version 8.0, just find two versions that are not particularly old). Then start two tomcats. Before starting, change the port number of one of them so that there will be no port conflict when the two tomcats are started. One is its own port 8080, and the other is changed to port 9080. After configuration, open the cmd command window. My tomcat is placed in the d:\software\apache-tomcat-8.5.24 directory. Follow the following command to start. If the startup is successful, another window will pop up.
    Nginx 1265 2023-05-16 13:28:06
  • How to solve the problem of 404 when configuring Nginx React project
    How to solve the problem of 404 when configuring Nginx React project
    As we all know, after writing the project, we need to deploy the project. The configuration is very simple. Location/demo{rootE:/;indexindex.htmlindex.htm;} has a problem. It can only be configured at http://localhost/demo. /come to visit. If you want to access other interfaces inside such as http://localhost/demo/page1, you will get a 404 page not found. But during development, there was indeed no problem and it could be accessed, so I thought, do I have to use node for the project? No, maybe it’s because I don’t know how to configure it. The solution was finally found on other people’s nginx.co
    Nginx 1241 2023-05-16 13:01:18
  • How to solve nginx cannot run php file or directory
    How to solve nginx cannot run php file or directory
    Solution to the problem that nginx cannot run php files or directories: 1. Start the php-fpm server; 2. Check the nginx configuration of the website; 3. Open the nginx.conf file and check the root instruction and fastcgi_param instruction paths; 4. Change the instruction path to the desired The accessed file path settings can be consistent. To solve the problem of nginx not parsing php, nginx was successfully installed and ran. PHP was installed successfully and php-fpm was successfully run: servicephp-fpmstartnetstat-antp|grep:80netstat-antp|grep:9000, 80 and 9000 ports are all in listening state ngi
    Nginx 2479 2023-05-16 12:58:17
  • Nginx configuration process example analysis
    Nginx configuration process example analysis
    1. Download nginx 2. Unzip 3. Configure and download the runhiddenconsole.exe software 4. Start: @echooff@echostartingnginx...runhiddenconsolenginx.exe@echostartingphp-cgi...runhiddenconsoled:/php-5.6.13-win32-vc11-x64 /php-cgi.exe-b127.0.0.1:9000-cd:/php-5.6.13-win32-vc11-x64/php.iniexitpause 5. Close: @ec
    Nginx 1185 2023-05-16 12:28:12
  • How to define Header header information through Nginx
    How to define Header header information through Nginx
    By modifying the nginx conf file, you can easily customize the HTTPHeader. Nginx uses the ngx_headers_more module to add and delete outbound and inbound Header information. By default, this module is not added to the source code of Nginx. If you want to use related functions, you need to add this module when compiling Nginx. The Nginx in my server did not add this module when compiling. Use -V to view the current Nginx compilation parameters: [root@z-dig~]#nginx-Vnginxversion:www.z-dig.combuiltbygcc4.4.720120313(RedHat4
    Nginx 1670 2023-05-16 11:52:13
  • How to remove unused Nginx modules
    How to remove unused Nginx modules
    Remove unused Nginx modules. When compiling and installing, add the following configuration instructions when executing the ./configure method to explicitly delete unused modules: ./configure--without-module1--without-module2--without-module3. For example :./configure--without-http_dav_module--withouthttp_spdy_module Note: Configuration instructions are provided by the module. Make sure the module you disable does not contain the directives you need to use! Before deciding to disable a module, you should check the Nginx documentation for the available instructions for each module.
    Nginx 2341 2023-05-16 11:40:12
  • How to implement nginx speed limit
    How to implement nginx speed limit
    nginx speed limit can be implemented through the ngx_http_limit_conn_module and ngx_http_limit_req_module modules. 1. ngx_http_limit_conn_module: This module mainly limits the download speed. 1. Concurrent connection limit: http{...limit_conn_zone$binary_remote_addrzone=aming:10m;...server{...limit_connaming10;...}} Description: First use limit_conn_zone to define a memory block index
    Nginx 2659 2023-05-16 11:16:12
  • How to prevent Nginx from being maliciously parsed by domain names
    How to prevent Nginx from being maliciously parsed by domain names
    The main reason is that the following configuration code is missing: nginx version 1.8.0server{listen80default_server;server_name_;return403;} causes all unconfigured server_name to return a 403 error. I have never added this configuration to nginx before, but I have never encountered it again. This kind of problem, and I tested it on another server. Even without this code, it is impossible to parse and request successfully. I am very speechless. Supplement: After searching around, I found that nginx should use its own unique 444 status code for this kind of problem. Server{listen80default_server;s
    Nginx 1289 2023-05-16 09:46:10
  • How to install Nginx server on Ubuntu
    How to install Nginx server on Ubuntu
    Install nginx sudoapt-getinstallnginx If you have installed apache and apache is running at this time, please modify the configuration file first (students who do not have it will skip it directly): #Open the configuration file sudovim/etc/nginx/sites-available/default and press The following two modifications (in order not to conflict with apache): server{#Modify here and I will change 80 to 88listen88default_server;#Also change it here to the listening port you want listen[::]:88default_serveripv6only=o
    Nginx 1259 2023-05-16 09:25:05
  • How to implement webshell upload under nginx load balancing
    How to implement webshell upload under nginx load balancing
    Scenario description assumes that in a real production environment, there is an RCE vulnerability, which allows us to obtain the installation of the WebShell environment. First, before pulling the vulnerable image on GetHub, we need to install nginx and tomcat on centos in advance and configure nginx and tomcat. Configuration file, use docker to pull down the image, and reproduce the vulnerability. 1. Set up the docker environment first. 2. Test whether tomcat can be accessed. As can be seen from the above figure, the back-end tomcat is accessible. 3. Check the load balancing of nginx reverse proxy in docker. 4. Check the ant in lbsnode1 in docker. .jsp text
    Nginx 1654 2023-05-16 08:16:13
  • How to configure Nginx access and error logs
    How to configure Nginx access and error logs
    Nginx is an open source, high-performance HTTP and reverse proxy server responsible for handling the load of some of the largest sites on the Internet. One of the most common tasks you'll perform when managing an NGINX web server is checking log files. Knowing how to configure and read logs is very useful when troubleshooting server or application issues because they provide detailed debugging information. Nginx uses two types of logs to record its events: access logs and error logs. Access logging records information about client requests, and error logging records information about server and application problems. Configuring Nginx access logs Nginx generates a new record in the access log whenever a customer request is processed.
    Nginx 1975 2023-05-16 08:10:05
  • How to use nginx to build a file server for uploading and downloading in a container
    How to use nginx to build a file server for uploading and downloading in a container
    1. Install the nginx container. In order for nginx to support file upload, you need to download and run the container with the nginx-upload-module module: sudopodmanpulldocker.io/dimka2014/nginx-upload-with-progress-modules:latessudopodman-d--namenginx- p83:80docker.io/dimka2014/nginx-upload-with-progress-modules This container comes with both the nginx-upload-module module and ng
    Nginx 2432 2023-05-15 23:49:04

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