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

  • How to use nginx forward proxy to forward intranet domain names
    How to use nginx forward proxy to forward intranet domain names
    In the customer's intranet environment, ppoe dial-up is used to access the Internet. The provider is a secondary operator within the group. The network environment is relatively complex. The group's internal network and office network are interconnected using a static routing protocol. The general situation is as follows: It turns out that the customer accesses the production business. They are all accessed through IP addresses. As more and more production services are produced, customers now strongly require the use of domain names to access services. However, given the complexity of the intranet environment, it is difficult to deploy a domain name server, and it is also difficult to deploy access services. Later, I learned nginx and learned that nginx can implement forward proxy to forward domain names. Instructions: 1. Configure domain name resolution on Alibaba Cloud. For example, oa.xxxx.com, the resolution address is the intranet address 172.31.101.362, 172.
    Nginx 4028 2023-05-15 21:46:04
  • How to use Docker Compose to implement nginx load balancing
    How to use Docker Compose to implement nginx load balancing
    Use docker network management and container ip settings as basic knowledge to implement nginx load balancing. View all docker networks dockernetworkls/*networkidnamedriverscopeb832b168ca9abridgebridgelocal373be82d3a6acomposetest_defaultbridgelocala360425082c4hosthostlocal154f600f0e90nonenulllocal*///composetest_default is the previous article when introducing compose, do
    Nginx 1868 2023-05-15 21:37:12
  • How to use Nginx to limit access frequency, download rate and number of concurrent connections
    How to use Nginx to limit access frequency, download rate and number of concurrent connections
    1. Overview of modules and instructions used to limit access frequency, concurrent connections, and download speed ngx_http_limit_req_module: used to limit the number of requests per unit time, that is, rate limit, using the leaky bucket algorithm "leakybucket" ngx_http_limit_conn_module: used to limit connections at the same time Number, that is, concurrency limit limit_rate and limit_rate_after: Download speed setting leaky bucket algorithm (leakybucket) The algorithm idea is: water (request) is poured into the bucket from above, flows out from below the bucket (processed), and the water that is too late to flow out is stored in the bucket (buffer) , flows out at a fixed rate; when the bucket is full, the water
    Nginx 1931 2023-05-15 21:22:22
  • How to configure common functions after Nginx installation
    How to configure common functions after Nginx installation
    1. Separate the main configuration file from the virtual host. If there are many virtual hosts, it will be more convenient to separate them. They can also be divided according to functions and services. The following takes two virtual hosts as an example. Complete configuration file after removing blank lines and comments: [root@nginx-01conf]#egrep-v"#|^$"nginx.conf.bakworker_processes1;events{worker_connections1024;}http{includemime.types;default_typeapplication/octet- stream;send
    Nginx 1298 2023-05-15 21:19:11
  • How to solve the problem of Nginx forwarding lost cookies
    How to solve the problem of Nginx forwarding lost cookies
    1. Lost Cookies Operation path one: http://localhost:8080/content/requestAction!showMainServiceReqDetail.action path two: http://localhost/content/requestAction!showMainServiceReqDetail.action path three: http://localhost/clp/ requestAction!showMainServiceReqDetail.action path one is direct access, path two is the same as path
    Nginx 3263 2023-05-15 21:10:12
  • How to achieve high availability by combining keepalived with nginx
    How to achieve high availability by combining keepalived with nginx
    1. Introduction keepalived is a high-availability solution for LVS services based on the vrrp protocol, which can be used to avoid single points of failure. An LVS service will have two servers running keepalived, one as the main server (master) and one as the backup server (backup), but it appears as a virtual IP to the outside world. The main server will send specific messages to the backup server. When the backup server When the server cannot receive this message, that is, when the main server goes down, the backup server will take over the virtual IP and continue to provide services, thereby ensuring high availability. keepalived is the perfect implementation of vrrp, so before introducing keepalived, let’s introduce v
    Nginx 1562 2023-05-15 21:07:12
  • How to configure Nginx virtual host in CentOS7.3
    How to configure Nginx virtual host in CentOS7.3
    Experimental environment A minimally installed centos7.3 virtual machine configures the basic environment 1. Install nginxyuminstall-yepel-*yumisntall-ynginxvim 2. Establish the site root directory of the virtual machine host mkdir/var/wwwrootmkdir/var/wwwroot/site1mkdir/var/ wwwroot/site2echo-e"site1">>/var/wwwroot/site1/index.htmlecho-e"site2">>/var/
    Nginx 1625 2023-05-15 20:55:19
  • How Docker runs nginx and mounts local directories into images
    How Docker runs nginx and mounts local directories into images
    1. Pull the image dockerpullnginx from hup. 2. Create the directory to be mounted: mkdir-p/data/nginx/{conf, conf.d, html, logs} 3. You must first have a configuration file to start the container 3.1vim/data/conf/nginx. confusernginx;worker_processes1;error_log/var/log/nginx/error.logwarn;pid/var/run/nginx.pid;events{worker_connections1024;}http{includ
    Nginx 1326 2023-05-15 20:25:16
  • What are the differences between Nginx and Apache?
    What are the differences between Nginx and Apache?
    Nginx, like Apache, is HTTP server software. Both adopt modular structure design in functional implementation. Both support common language interfaces, such as PHP, Perl, Python, etc., and also support forward and reverse proxies, virtual hosts, URL rewriting, compressed transmission, SSL encrypted transmission, etc. The main difference between Apache and NGINX is their design architecture. Apache uses a process-driven approach and creates a new thread for each request. NGINX uses an event-driven architecture to handle multiple requests in a thread. What is Apache HTTP server? Apache HTTP server is an open source cross-platform web server, also known as "httpd
    Nginx 5818 2023-05-15 19:46:04
  • How to deploy single-page application with Docker+Nginx
    How to deploy single-page application with Docker+Nginx
    From development to deployment, do it yourself. When we develop a single-page application, npmrunbuild will generate an index.html in the dist directory after executing the build. So how to deploy this index.html to the server? Directory structure dist/: Static files built by the front-end docker/: Configuration file configuration required for the mirror nginx picks a few configuration points to talk about. First, gzip compresses resources to save bandwidth and improve browser loading speed. Although webpack already supports it during build Just generate a .gz compressed package, but you can also enable gzipon through nginx;gzip_disable"msie6";#0-9, etc.
    Nginx 920 2023-05-15 19:40:19
  • How to solve the problem that nginx deployment vue project cannot find js css file
    How to solve the problem that nginx deployment vue project cannot find js css file
    Many times after npmrunbuild, the relative directory of the js file and css file automatically inserted by webpack in the index.html file is always wrong. After publishing it to the server, nginx cannot find the file. vue-cli@3 In vue-cli@3 you need to add a baseurl for all files that your webpack inserts into index.html. You need to create a new vue.config.js in the root directory of the project and add the following content:. ..module.exports={baseurl:isprod?'/basexxx/':&#3
    Nginx 2979 2023-05-15 19:40:12
  • How to configure pseudo-static and adapt client in nginx
    How to configure pseudo-static and adapt client in nginx
    The backend uses the thinkphp3.2.3 framework. If you are using other languages ​​or languages, please make appropriate modifications to server{listen80;server_namewww.morgen.club;#charsetkoi8-r;#access_loglogs/host.access.logmain;website root directory location/ {roothtml;indexindex.htmlindex.htm;#Set the access device set$source_device'index';#Judge it to be a mobile client or ipadif($ht
    Nginx 1728 2023-05-15 19:37:04
  • How to configure Nginx server to prevent Flood attacks
    How to configure Nginx server to prevent Flood attacks
    In the test, I will simply tell you how to configure the nginx limit request module and how it protects your website from being attacked by DDoS or other http-based denial of service attacks. In this test, I saved the sample page in blitz.io (now a free service) and named it about.html to test the limit_req directive. First, I used the following command on blitz to initiate 1075 concurrent requests It lasts for one minute, the response timeout is set to 2 minutes, the area is California, and all other states except status 200 are set to abnormal status. Even 503 is considered unsuccessful. -p1-1075:60-- status2
    Nginx 925 2023-05-15 18:52:06
  • How does Nginx cooperate with PHP to realize the function of generating real-time thumbnails?
    How does Nginx cooperate with PHP to realize the function of generating real-time thumbnails?
    nginx configuration: Copy the code as follows: #Assume that there is a file on the server: abc.jpg, and the original image can be accessed through http://filefs.domain.com/file/abc.jpg. In fact, generally, we only save the content of "/file/abc.jpg" in the database. #Now, we need to implement the thumbnail #abc.jpg.w320.jpg (w320, 320px width) automatically generated by the server through http://filefs.domain.com/file/abc.jpg.w320.jpg. and return image data. #The following two conditions must be met:
    Nginx 1077 2023-05-15 18:37:06
  • How to install and configure Nginx in Ubuntu
    How to install and configure Nginx in Ubuntu
    1. Introduction to nginx nginx is a very lightweight http server. nginx, which is pronounced as "enginex", is a high-performance http and reverse proxy server, and is also an imap/pop3/smtp proxy server. 2. Support for PHP. Currently, there are three types of support for PHP by various web servers: (1) Through the built-in modules of the web server, such as apache's mod_php5, and similar apache's built-in mod_perl can support perl. (2) Implemented through cgi, which is just like the previous cgi of perl. The disadvantage of this method is poor performance, because every time the server encounters these scripts
    Nginx 2097 2023-05-15 18:07:25

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