Optimization of Nginx: version hiding, timeout management and process management
Configure Nginx hidden version number
In the production environment, the version number of Nginx needs to be hidden to reduce security risks
View method
1. Use fiddler I to check the Nginx version number on the Windows client,Use "curl-i web address" command to view in CentOS system
The method of hiding version number in Nginx
1. Mod ...
Added by Roble on Fri, 15 Nov 2019 17:44:28 +0200
Nginx optimization log segmentation
Log segmentation
1. Too many log files in the enterprise server cause the following problems:1. It is inconvenient for development and operation and maintenance to query too large log files, especially when overtime workers are tired;2. Long time ago, log files were almost worthless, but manual cleaning was too cumbersome.At this time, a solut ...
Added by Hard Styler on Thu, 14 Nov 2019 22:22:12 +0200
Dry | CVE-2019-11043: Any Code Execution Vulnerability Analysis for PHP-FPM under Nginx specific configuration
Recently, Andrew Danau, a foreign security researcher, stumbled upon a bug in the processing of a specific request by the php-fpm component during the flag race (CTF: Capture the Flag): a particular constructed request could cause a php-fpm processing exception under a specific Nginx configuration, resulting in remote execution of arbitrar ...
Added by JeditL on Thu, 14 Nov 2019 09:48:58 +0200
Nginx Optimization - Hide Version Number and Page Cache Time
Configure Nginx Hidden Version Number
In a production environment, you need to hide the Nginx version number to avoid securityLeakage of vulnerability
View Method< Use fiddler I to view Nginx version number on Windows clientUse "curl-I web address" command to view in CentOS system
Nginx Hide Version Number MethodModify Profile Met ...
Added by freshneco on Wed, 13 Nov 2019 21:10:09 +0200
Self developed composer package of lumen
Take my zero / lumen elastic search package as an example
Note that this plug-in uses the lumen framework
1. Installation dependency
composer require zzq/lumen-elasticsearch
2. Create the elasticsearch.php configuration file with the following contents:
<?php
return [
/**
* You can specify one of several different connections whe ...
Added by ThaSpY on Wed, 13 Nov 2019 16:24:15 +0200
PHP Framework websocket Active Message Push
Laravel combines swoole to implement a function that actively triggers message pushing, which allows you to send custom messages to all members of the template message, instead of sending messages through the client, and listens to the messages sent in the message on the service side for business logic.
Active Message Push ImplementationNormall ...
Added by neptun on Tue, 12 Nov 2019 05:17:24 +0200
PHP Swoole long connection FAQ
Connection failureExampleAmong them, the common errors reported by Redis are:
Configuration item: timeoutError while reading line from the serverRedis can configure that if the client does not send data to the redis server after several seconds, the connection will be close d.
Common MySQL errors:
Configuration item: wait & Interactive time ...
Added by Doom87 on Mon, 11 Nov 2019 11:47:31 +0200
The use of redis in yii2.0
Add redis cache to the project
1.composer installs redis
composer require "yiisoft/yii2-redis"
2. Settings in the project configuration file: import cache and link redis server
common/config/main.php:
'components' => [
'cache' => [
// 'class' => 'yii\caching\FileCache',
...
Added by gacon on Sun, 10 Nov 2019 23:33:26 +0200
PHP Laravel queue tips: Fail, Retry or Delay
When you create a queue job, listener, or subscriber to push to the queue, you may begin to think that once dispatched, it's up to you, the queue worker, to decide what to do with your logic.
Um... It's not that you can't interact with queue workers from within a job, but usually, even if you do, it's unnecessary.
This magical operation is due ...
Added by winstond on Sun, 10 Nov 2019 15:49:58 +0200
Using MongoDB in Laravel
MongoDB utility scenarios
Product user access log, click buried statistical information
Business System Environment Parameter Configuration Information
Business system runtime logs, such as laravel.log, nginx.log
Install MongoDB PHP Driver on macoOS using Homebrew
In macOS, the MongoDB extension has been removed from the Homebrew repository ...
Added by bigfatpig on Sun, 10 Nov 2019 07:08:02 +0200