current location:Home > Technical Articles > Operation and Maintenance > Nginx
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to configure and test virtual domain names in Nginx environment
- Using nginx virtual domain name configuration, you can access the local server through a specific domain name without purchasing a domain name. Reduce unnecessary expenses before launch. Configuration steps 1. Edit the nginx.conf configuration file sudovim/usr/local/nginx/nginx/conf/nginx.xonf (1) Add the domain name to the file name (to facilitate future management). The code added here is http in nginx.conf Just add it under the node. But you need to pay attention to the path of the vhost folder. The path of the vhost folder created here is: /usr/local/nginx/nginx/conf/vhost, but ng
- Nginx 1647 2023-05-14 16:22:06
-
- How docker nginx deploys multiple projects
- Prerequisites 1. Docker has been installed on the local computer and server. You can download it on Google. 2. Already have an account on dockerhub and register for the portal: 3. You need to be familiar with docker and understand some instructions in dockerfile. Use dockerfile to create Mirror If there is a project called web on this machine, create a new dockerfile in the web root directory and write the following content fromnginx:1.13.6-alpinelabelmaintainer="lilywang"argtz="asia/shanghai"envtz${tz}
- Nginx 1408 2023-05-14 16:16:12
-
- How to use Docker to deploy Nginx+Flask+Mongo applications
- nginx is used as the server, mongo is the database support, and flask is the web framework of the python language. Using the container features of docker, it can be simply deployed on the Linux server. The main directory of the project preparation project is as follows __project-name|__docker-file|__ningx|__dockerfile |__conf|__nginx.conf|__flask|__dockerfile|__requirements.txt|__mongo|__dockerfile|__setup.sh|__docker-compose.yml|
- Nginx 1350 2023-05-14 16:16:06
-
- How can Nginx efficiently deploy multiple sites on one server?
- Let's take a look at our needs. I have three website projects here that need to be deployed (corresponding to three domain names in turn). A Linux server is provided to enable access to the corresponding domain name to jump to the corresponding website. Let's take a look at the architecture diagram I designed to solve this problem: Here we assume that the public IP address of the Linux server in the diagram is 192.168.2.100, and then assume that we want to build three sites on this server: www.nginxtest.net , admin.nginxtest.net, app.nginxtest.net. Okay, let’s configure it in detail: 1. To configure nginx reverse proxy, we still connect to ssh first, and then enter
- Nginx 2753 2023-05-14 16:13:06
-
- How to use shared memory in nginx
- The use of ngx_shmem. The ngx_shmem.c/h file is just a very simple encapsulation of the mmap()/munmap() system call or shmget()/shmdt(). Implemented the ngx style basic library, which can apply for and release a continuous shared memory space. It is generally used for fixed-length shared data. The data length is fixed and will not expand or shrink during use. typedefstruct{u_char*addr;size_tsize;...}ngx_shm_t;ngx_int_tngx_shm_alloc(ngx_shm_t*shm);voidngx_shm_free(ngx
- Nginx 1593 2023-05-14 15:55:06
-
- How to install PHP and Nginx on Centos7
- 1. Install PHP. As WeChat became popular in 2013, the use of PHP has also become popular again. Many companies on the market have chosen to use PHP as their application backend. Personally, I think the reasons are: 1. The cost of PHP is low. 2. PHP is easy to get started with. 3. The development cycle of PHP is relatively short. 4. The birth of TP5 has improved the efficiency of PHP interface development. Because there are so many demands, many companies' server configurations need to be able to support the PHP environment to complete project construction. In fact, there are generally two types of centos installation software. The first is quick installation and the second is compilation and installation. I personally recommend compilation and installation. As for the quick installation method, it is simple and fast. Just load the corresponding php source and complete one step through yuminstall.
- Nginx 1917 2023-05-14 15:37:06
-
- How Nginx and GeoIP modules read the geographical information of IP
- Linux installation geoipyuminstallnginx-module-geoiphttp_geoip_module usage scenario 1. Differentiate http access rules at home and abroad 2. Differentiate http access rules in domestic cities and regions After yum is installed, find the installed module file. If nginx is installed with yun, it is usually installed to /etc Note in the /nginx/modules/ directory: If nginx is not installed by yum but compiled and installed from source code, you need to reinstall and compile nginx and add this module, and then you do not need to add this module manually. Manually add the module and load the module and http at the head of the nginx.conf configuration file.
- Nginx 1881 2023-05-14 15:10:06
-
- How to configure nginx with ssl to achieve https access
- Apply for a certificate here. I directly applied for a free certificate from Tencent Cloud. It should be noted here that the free certificate issued by the Asian Trust Agency can only be used for one domain name, and sub-domain names need to be applied for separately. Not to mention, the application in Tencent is quite fast, and it was approved in more than ten minutes. Download a zip file, unzip it, open the nginx folder inside, and copy the 1_xxx.com_bundle.crt and 2_xxx.com.key files. Open the nginx configuration file. If you don’t know the location of the nginx file, you can use the whereisnginx command to find it. My configuration file is in /ect/nginx. Now copy the two certificate files just now and configure them directly later.
- Nginx 1292 2023-05-14 15:07:14
-
- How to install Nginx and configure automatic startup on CentOS7
- 1. Download the installation package from the official website and select the version suitable for Linux. Select the latest version here, download it locally and then upload it to the server or download it directly with the wget command under centos. Switch to the /usr/local directory and download the software package #cd/usr/local#wgethttp://nginx.org/download/nginx-1.11.5.tar.gz2. To install nginx, first execute the following command to install the nginx dependent library. If dependent libraries are missing, the installation may fail. For details, please refer to the error message at the end of the article. #yuminstallgcc-c++#yuminstallpcre#yumins
- Nginx 3304 2023-05-14 15:01:14
-
- How to redirect https through nginx load balancing
- Copy the certificate and key on the web side scp-rp-p52113/application/nginx/conf/key10.0.0.5:/application/nginx/conf/ Configure vim/application/nginx/conf/nginx.confworker_processes2 on the nginx load balancing server ;error_loglogs/error.log;events{worker_connections65535;}http{includemime.types;default_typeappli
- Nginx 1102 2023-05-14 14:58:23
-
- How to enable Nginx directory browsing function
- We all know that under apache, you can configure it to automatically display the file list under the directory when accessing a certain path of the web server. In fact, nginx is not weaker than apache at all. Of course, it can also achieve this function, and it is very easy and simple; The autoindex parameter is mainly used to enable it. Its configuration is as follows: Copy the code as follows: location/{root/data/www/file//Specify the absolute path of the actual directory; autoindexon;//Enable directory browsing function; autoindex_exact_sizeoff;//Close Detailed file size statistics, let the file size display in mb, gb units, the default is b; a
- Nginx 1580 2023-05-14 13:46:06
-
- How to customize logging and enable log buffer in Nginx
- Access log nginx writes information about a client's request in the access log immediately after processing the request. By default, the access log is located in logs/access.log, and information is written to the log in a predefined combination format. If you want to accurately record access information, you need to customize a more complete access log format, as shown below: http{log_formatgeoproxy'[$time_local]$remote_addr''$realip_remote_addr$remote_user''$request_m
- Nginx 1325 2023-05-14 13:07:33
-
- How to configure keepalived dual-machine hot standby nginx
- Environment preparation: 2 centos: 192.168.0.105 and 192.168.0.118, the virtual IP (vip) is 192.168.0.119, configure keepavlived. Install keepalivedyuminstallkeepalived on 105 and 118 respectively. Prepare the heartbeat script. The configuration of keepalived is quite flexible, and the script command can be executed regularly. , used for heartbeat check. For example, when we access nginx and find that nginx is inaccessible, we turn off keepalived, thereby switching to nginx to achieve uninterrupted service support. vi/etc/keepalived
- Nginx 1349 2023-05-14 12:34:11
-
- Nginx quick start example analysis
- Why use nginx? At present, the main competitor of nginx is apache. Here I will make a simple comparison between the two to help everyone better understand the advantages of nginx. 1. As a web server: Compared with apache, nginx uses fewer resources, supports more concurrent connections, and reflects higher efficiency. This makes nginx especially popular with virtual host providers. In the case of high connection concurrency, nginx is a good substitute for the apache server: nginx is one of the software platforms often chosen by bosses in the virtual host business in the United States. It can support responses of up to 50,000 concurrent connections. Thanks to nginx for We chose epollan
- Nginx 1015 2023-05-14 12:19:20
-
- How to quickly install Nginx server on CentOS
- 1. Download nginx Download the latest version of nginx from the official website of nginx (http://nginx.org/en/download.html). Here I downloaded nginx-1.9.12. After the download is completed, you will get a compressed package as shown in the figure below. Upload the tar package of nginx to the Linux server, as shown in the figure below: 2. Install nginx2.1. Installation prerequisites. Before installing nginx, you need to ensure that g++ and gcc are installed on the system. , openssl-devel, pcre-devel and zlib-devel software. 1. Install necessary software: yum-yinstallzli
- Nginx 1034 2023-05-14 12:04:12