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 solve the problem that Font Awesome is not displayed in Firefox under Apache/Nginx
- 1. nginx server solution The server uses nginx. To add the access-control-allow-origin field to the response header, the method of adding is to use the add_header directive: Configuration example: Copy the code as follows: location/assets/{gzip_staticon; expiresmax;add_headercache-controlpublic;add_headeraccess-control-allow-origin*;} 2. Apache server solution fontawesome (firefox cannot display fire
- Nginx 1410 2023-05-21 17:43:06
-
- How to configure and use the map module in Nginx server
- The map directive uses the ngx_http_map_module module. By default, nginx loads this module unless artificially --without-http_map_module. The ngx_http_map_module module can create variables whose values are associated with the values of other variables. Allows classification or simultaneous mapping of multiple values to multiple different values and storage in a variable. The map directive is used to create a variable, but only performs the view mapping operation when the variable is accepted. For processing requests that do not reference variables, this The module has no performance shortcomings. 1.ngx_http_map_module module instruction description map syntax
- Nginx 2778 2023-05-21 17:14:38
-
- How to use Zabbix custom script to monitor nginx and WeChat alarms
- Project Description The purpose of this project is to build a zabbix monitoring system that can implement WeChat alarms, conveniently monitor the entire NGINX cluster, and at the same time deploy and manage the entire cluster in batches. Project steps: Install zabbixserver on the zabbix server (192.168.2.138), install zabbixagent (192.168.2.58) on the nginx side, configure the Nginx load balancing cluster, and turn on status statistics. Write a monitoring script on the nginx side to get the status of nginx. The server-side web adds monitoring items and outputs pictures. Register the enterprise WeChat and configure the WeChat interface. Add the interface push script to the zabbix server and test that the interface is normal. in we
- Nginx 1793 2023-05-21 17:10:06
-
- How to achieve smooth restart and upgrade of nginx
- If you change the nginx configuration file (nginx.conf) and want to restart nginx, you can also do it by sending a system signal to the nginx main process. However, before restarting, make sure the syntax of the nginx configuration file (nginx.conf) is correct, otherwise nginx will not load the new configuration file. You can determine whether the nginx configuration file is correct by running the following command: /usr/local/webserver/nginx/sbin/nginx-t-c/usr/local/webserver/nginx/conf/nginx.conf If the configuration file is incorrect, the screen will prompt you to configure it. arts
- Nginx 1065 2023-05-21 17:07:06
-
- How to configure nginx https 443 port
- 1. Log in to the domain name controller such as Alibaba Cloud or Tencent Cloud to download the free certificate 2. Click nginx to download and upload it to the server 3. nginx configures the https protocol server{listen443ssl;server_namexxx.com;ssl_certificatecert/downloaded pem suffix file;ssl_certificate_keycert/download key suffix file;ssl_session_timeout120m;ssl_protocolsTLSv1TLSv1.1TLSv1.2;ssl_ciphersALL:!ADH:!EXPORT5
- Nginx 3703 2023-05-21 16:40:06
-
- How to configure Location from scratch in Nginx
- Basic knowledge: The matching order of location is "match regular first, then normal". The matching order of location is actually "match common first, then match regular". The reason for the misunderstanding is: regular matching will override ordinary matching nginxlocation configuration syntax 1.location[=|~|~*|^~]uri{...}2.location@name{...}location configuration can have two Configuration methods 1. Prefix + uri (string/regular expression) 2. @+name prefix meaning =: exact match (all must be equal) ~: case sensitive ~*: ignore case ^~: only need to match uri Part @: internal service jump loc
- Nginx 890 2023-05-21 16:22:06
-
- How to do nginx php not cache files
- How to set nginxphp not to cache files: 1. Find and open the nginx configuration file; 2. Pass "location~.*\.(gif|jpg|jpeg|png|bmp|swf|js|css)${add_headerCache-Controlno -store;}" just disable caching. How to do nginxphp without caching files? Nginx cache-disabling configuration When debugging website programs, you often encounter browser cache problems that cause the modified front-end code to have no effect. The cache can be cleared only after forcing a refresh via Ctrl+F5 each time. At this time, if you disable the nginx cache, you can reduce some minor troubles and allow the browser to
- Nginx 1588 2023-05-21 16:09:18
-
- How to ban ip access or illegal domain name access in Nginx
- In a production environment, for safe access to the website, Nginx needs to prohibit some illegal access, such as malicious domain name resolution and direct use of IP to access the website. Some commonly used configuration examples are recorded below: 1) Forbid IP access. If the servername is not matched, default will be found and a 501 error will be returned. server{listen80default_server;server_name_;return501;}2) Jump to the homepage via 301 server{listen80default_server;server_name_;rewrite^(.*)http://www.jb51.c
- Nginx 1189 2023-05-21 15:55:06
-
- How to use tomcat with nginx
- Summary of using tomcat combined with nginx I believe many people have heard of nginx. This small thing is slowly eating up the share of apache and IIS. So what exactly does it do? Maybe many people don't understand it. Speaking of reverse proxy, many people may have heard of it, but many people may not know what a reverse proxy is. Excerpt from a description on Baidu Encyclopedia: The reverse proxy (ReverseProxy) method refers to using a proxy server to accept connection requests on the Internet, then forwarding the request to the server on the internal network, and returning the results obtained from the server to the Internet When a client requests a connection, the proxy server appears as a server to the outside world. It’s very telling here
- Nginx 2182 2023-05-21 13:07:06
-
- How to define nginx pseudo-static rules
- 1. nginx pseudo-dynamic rules rewrite^(.*)/tags.html$1/tags.php; rewrite^(.*)/tags/(.*)-1.html$1/tags.php?/$2/ $3;or rewrite^([^\.]*)/tags.html$1/tags.php;rewrite^([^\.]*)/tags/(.*)-([0-9]+). html$1/tags.php?/$2/$3;2. .htaccess file pseudo-information requirement RewriteBase/RewriteRule^tags\.html$/ta
- Nginx 1057 2023-05-21 12:19:06
-
- How to configure nginx reverse proxy webSocket
- Because the websocket protocol is upgraded based on the http protocol (see the picture below), you can use nginx reverse proxy websocket.websocket. As can be seen from this picture, the websocket connection is established based on the http protocol. get/chathttp/1.1host:server.example.comupgrade:websocketconnection:upgradesec-websocket-key:x3jjhmbdl1ezlkh9gbhxdw==sec-websocket-protocol:chat,sup
- Nginx 1447 2023-05-21 12:13:06
-
- How to integrate Kafka with Nginx
- Background nginx-kafka-module is a plug-in for nginx. It can integrate kafka into nginx to facilitate the collection of front-end page buried point data in web projects. If the front-end page has set up buried points, some of the user's access and request data can be collected. The HTTP request is sent directly to the message middleware Kafka, and the backend can consume the messages in Kafka through the program to perform real-time calculations. For example, sparkstream is used to consume data in Kafka in real time to analyze user pv, uv, some user behaviors and the funnel model conversion rate of the page, so as to better optimize the system or conduct real-time dynamic analysis of visiting users. Specific integration steps 1. Install git
- Nginx 2269 2023-05-21 12:07:06
-
- How to configure nginx upstream reverse proxy
- nginx配置upstream反向代理http{...upstreamtomcats{server192.168.106.176weight=1;server192.168.106.177weight=1;}server{location/ops-coffee/{proxy_passhttp://tomcats;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-F
- Nginx 1858 2023-05-21 11:46:06
-
- How to solve nginx not parsing php files
- PHP is not installed or configured First, make sure PHP is installed on your server and nginx is properly configured to work. To check if PHP has been installed correctly, open a terminal and run the following command: php -v This will display the PHP version currently installed on your server. If the PHP version is not displayed, consider installing PHP. To ensure that PHP works with nginx, edit the nginx configuration file and add the following lines: location~\.php${fastcgi_passunix:/run/php/php7.4-fpm.sock;fastcgi_indexindex.php;includefastcgi_pa
- Nginx 1777 2023-05-21 10:46:46
-
- What are the Nginx path matching rules?
- 1. Classification of path configuration In nginx, there are 4 different path configuration methods =-Exactmatch^~-Preferentialmatch~&&~*-Regexmatchnomodifier-Prefixmatch#If the path is exactly the same, it will match location=path{}#If the beginning of the path is the same, then Matching location^~path{}#Regular matching, case-sensitive location~path{}#Regular matching, case-insensitive location~*path{}#Prefix matching locationpath{}The above execution order is, first check Exac
- Nginx 3583 2023-05-21 10:37:10