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

  • How to configure nginx server under ubuntu
    How to configure nginx server under ubuntu
    Detailed explanation of nginx server configuration under ubuntu 1. Installation of nginx server sudoapt-getinstallnginx2. Startup of nginx server sudo/etc/init.d/nginxstart3. Multiple domain names correspond to different backend servers in the /etc/nginx/sites-enabled/ directory Delete the default configuration file and create a new configuration file corresponding to the domain name, such as test.youlunshidai.com# Multiple nodejs nodes can be configured through upstreamnodejs__upstream for load balancing upstreamnodejs__u
    Nginx 2207 2023-05-15 09:04:05
  • How to configure PHP error logs when using PHP-FPM in Nginx
    How to configure PHP error logs when using PHP-FPM in Nginx
    nginx is different from apache. In apache, you can directly specify the error log of php, so that the error information during php execution is directly input into the error log of php, which can be easily queried. In nginx, things become like this: nginx only records access logs for page visits. There will be no php errorlog information. nginx sends the request for php to the php-fpmfastcgi process for processing. The default php-fpm will only output the error message of php-fpm, and the error log of php cannot be seen in the errorslog of php-fpm. The reason is that the configuration file php of php-fpm
    Nginx 1411 2023-05-15 08:58:12
  • How to build a reverse proxy for Nginx server
    How to build a reverse proxy for Nginx server
    Part 1: Installation 1 Establish users and groups /usr/sbin/groupaddwww/usr/sbin/useradd-gwwwwww 2 Install pcre to let nginx reverse proxy support rewrite for future needs wgetftp://ftp.csx.cam.ac.uk /pub/software/programming/pcre/pcre-7.8.tar.gztarzxvfpcre-7.8.tar.gzcdpcre-7.8/./configuremake&&makeinstall3Install nginx reverse proxy wget
    Nginx 1677 2023-05-15 08:40:05
  • How to use Consul-template+Nginx to implement Thrift Consul load balancing
    How to use Consul-template+Nginx to implement Thrift Consul load balancing
    Overall Architecture Let’s first look at what the architecture of the entire framework looks like. Here we have three service providers and three service callers, which implement load balancing through Consul, Nginx, and Consul-template. Note that this example is for RPC load balancing. RPC is a tcp protocol, so Nginx needs to configure the tcp module to support tcp load balancing. Consul cluster is used for service registration, registering multiple service instances, and providing RPC services to the outside world. Consul-template is used to monitor the status of services in Consul in real time, and generates Nginx configuration files with its own template file. Nginx uses its own configuration file and second-step generation
    Nginx 796 2023-05-15 08:19:10
  • How to package Vue project and deploy nginx server
    How to package Vue project and deploy nginx server
    Usage scenarios: When we often use front-end and back-end separation projects, we will need to package the front-end Vue and then deploy it. 1. Packaging vue projects can actually be packaged directly through the following statement: npmrunbuild’s default packaging situation is as follows: When we need to modify the packaging name and static resource location, we need to configure it accordingly: 1. First create vue in the project root directory The configuration content of the .config.js file is as follows (with cross-domain problem resolution included): module.exports={//Packaging publicPath:'./',outputDir:'test',//Open
    Nginx 6517 2023-05-15 08:16:05
  • How to deploy centos+nginx+uwsgi to launch django project
    How to deploy centos+nginx+uwsgi to launch django project
    My Django project is called yunwei. The main apps are rabc and web. The entire project is placed under /opt/ as follows: [root@test-codeopt]#lsdjango_virtnginxredisredis-6.2.6yunwei[root@test-codeopt]#lsyunwei/manage.pyrbacstatictemplatesuwsgiwebyunwei[root @test-codeopt]#lsyunwei/uwsgi/cut_log.shloguwsgi.iniuwsgi.loguwsgi.p
    Nginx 1139 2023-05-15 08:13:13
  • How to configure Nginx server for PHP program under Debian system
    How to configure Nginx server for PHP program under Debian system
    nginx installation method: 1apt network installation modify the source list vi/etc/apt/sources.list#Add the following source debhttp://nginx.org/packages/debian/squeezenginxdeb-srchttp://nginx.org/packages/debian/squeezenginx Update the source list and install nginxapt-keyaddnginx_signing.keyapt-getupdateapt-getinstallnginx2 source code compilation and installation through apt. First install the compilation environment, because ngin
    Nginx 1126 2023-05-15 08:01:33
  • What are the Nginx Location directive URI matching rules?
    What are the Nginx Location directive URI matching rules?
    1. Introduction The location directive is the core configuration of the http module. It receives requests sent by users based on predefined URL matching rules. Based on the matching results, the request is forwarded to the backend server. Illegal requests are directly rejected and return 403. 404, 500 error handling, etc. 2. Location instruction syntax location[=|~|~*|^~|@]/uri/{…} or location@name{…} 3. URI matching mode The location instruction is divided into two matching modes: 1> Ordinary characters String matching: rules starting with = or without leading characters (~) 2> Regular matching: starting with ~ or ~* indicates regular matching, ~*
    Nginx 1572 2023-05-14 23:58:19
  • How to deploy Node site using Forever and nginx
    How to deploy Node site using Forever and nginx
    Persistent thread running Generally speaking, we start a server through nodeindex.js on windowcmd. As long as it is not closed, we can always access and call the interface. But on Linux, if you do not operate it for a long time or you want to perform other operations, your node service will be disconnected and users will not be able to access your website. what to do? We can install the forever module to solve it. npminstallforever-g//Global installation of the forever module can be changed from the original startup mode nodeindex.js to foreverstartindex.js. Here are several common commands foreverlist//listed
    Nginx 1502 2023-05-14 23:52:16
  • How to configure Google reverse proxy on Nginx server
    How to configure Google reverse proxy on Nginx server
    1. Direct reverse proxy, built using 7ghost source code. The advantage is that it is simple and easy to use. The disadvantage is that it is easily blocked and cannot search for sensitive words. 2. Use SSL encrypted reverse proxy. The advantage is that it is safe and difficult to be blocked. The disadvantage is that it is relatively technical and requires a lot of trouble. Now I will briefly talk about the setting process of the second method. step1: You need to have a Linux overseas vps. step2: Establishment of nginx environment (for convenience, in the tutorial, amh one-click package is used to build the environment. Of course, you can use Junge’s one-click package or pure nginx environment. That is to say, only nginx is installed, and there is no need to install php, sql or anything else. # Yes.) step3: After installing amh, log in
    Nginx 1688 2023-05-14 23:19:10
  • What are the characteristics of LVS, Nginx and HAProxy load balancers in Linux
    What are the characteristics of LVS, Nginx and HAProxy load balancers in Linux
    LVS features: 1. Strong load resistance, using IP load balancing technology, only for distribution, so LVS itself does not generate much traffic; 2. Good stability and reliability, and has a perfect hot backup plan; (such as: LVS +keepalived) 3. It has a wide range of applications and can load balance all applications; 4. It does not support regular processing and cannot separate dynamic and static. Four commonly used algorithms: 1.rr: round-robin, allocated to back-end servers in turn; 2.wrr: weighted round-robin, allocated according to the load of the back-end server; 3.lc: minimum connection, allocated to the server with the fewest established connections Above; 4.wlc: connection with the smallest weight, allocated according to the processing capacity of the back-end server. You can use ipvsadm–p (pe
    Nginx 836 2023-05-14 22:49:12
  • How to deploy Nginx web service in RHEL8
    How to deploy Nginx web service in RHEL8
    EnvironmentRedHatEnterpriseLinuxrelease8.0VMwareWorkstationPro14 building steps[root@localhost~]#systemctlstophttpd#Stop httpd to prevent it from affecting Nginx[root@localhost~]#yuminstall-ynginx[root@localhost~]#systemctlstartnginx[root@localhost~]#iptables -F[root@localhost~]#systemctlstopfire
    Nginx 858 2023-05-14 22:31:11
  • How Docker quickly builds a PHP+Nginx+Mysql environment
    How Docker quickly builds a PHP+Nginx+Mysql environment
    准备创建目录mkdir-p/Users/mwqnice/Documents/Program/phpProgram&&mkdir-p/Users/mwqnice/Documents/Program/docker/php/php7.1.33/conf&&mkdir-p/Users/mwqnice/Documents/Program/docker/php/php7.1.33/logs&&mkdir-p/Users/mwqnice/Documents/Pr
    Nginx 1398 2023-05-14 22:25:04
  • How to check the compilation parameters of nginx, apache, mysql and php under Linux
    How to check the compilation parameters of nginx, apache, mysql and php under Linux
    Quickly check the compilation parameters of the server software: 1. nginx compilation parameters: your_nginx_dir/sbin/nginx-v2, apache compilation parameters: catyour_apache_dir/build/config.nice3, php compilation parameters: your_php_dir/bin/php-i|grepconfigure4, mysql compilation Parameters: catyour_mysql_dir/bin/mysqlbug|grepconfigure The following is a complete practical example: View the compilation parameters of nginx: [root@www~]#/usr/lo
    Nginx 1829 2023-05-14 22:22:04
  • How does Nginx support logical operations and uppercase and lowercase letter conversion when writing configuration?
    How does Nginx support logical operations and uppercase and lowercase letter conversion when writing configuration?
    Logical operations The configuration of nginx does not support the logical and && logical or || operations of if conditions, and does not support the nested syntax of if. Otherwise, the following error will be reported: nginx:[emerg]invalidcondition. We can achieve this indirectly using variables. Statement to be implemented: if($arg_unitid=42012&&$uri~/thumb/){echo "www.jb51.net";} If configured in this way, the nginx:[emerg]invalidcondition error will be reported. This can be achieved as follows:
    Nginx 992 2023-05-14 22:10: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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!