peterguo пре 2 месеци
родитељ
комит
35f9203c6a
4 измењених фајлова са 11 додато и 4 уклоњено
  1. 1 0
      mysql/my.cnf
  2. 1 1
      php-fpm/php8.3.ini
  3. 6 0
      php-fpm/xlaravel.pool.conf
  4. 3 3
      redis/redis.conf

+ 1 - 0
mysql/my.cnf

@@ -9,3 +9,4 @@
 sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
 character-set-server=utf8
 innodb_use_native_aio=0
+skip-name-resolve

+ 1 - 1
php-fpm/php8.3.ini

@@ -600,7 +600,7 @@ report_memleaks = On
 ; empty.
 ; https://php.net/error-log
 ; Example:
-;error_log = php_errors.log
+error_log = /var/log/php/php_errors.log
 ; Log errors to syslog (Event Log on Windows).
 ;error_log = syslog
 

+ 6 - 0
php-fpm/xlaravel.pool.conf

@@ -74,3 +74,9 @@ env[DB_1_ENV_MYSQL_USER] = $DB_1_ENV_MYSQL_USER
 env[DB_1_ENV_MYSQL_PASSWORD] = $DB_1_ENV_MYSQL_PASSWORD
 
 catch_workers_output = yes
+
+; 设置慢查询超时时间(秒)
+request_slowlog_timeout = 2s
+
+; 指定慢查询日志文件路径
+slowlog = /var/log/php-fpm/slow.log

+ 3 - 3
redis/redis.conf

@@ -66,7 +66,7 @@
 # IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
 # JUST COMMENT THE FOLLOWING LINE.
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-bind 127.0.0.1
+#bind 127.0.0.1
 
 # Protected mode is a layer of security protection, in order to avoid that
 # Redis instances left open on the internet are accessed and exploited.
@@ -85,7 +85,7 @@ bind 127.0.0.1
 # you are sure you want clients from other hosts to connect to Redis
 # even if no authentication is configured, nor a specific set of interfaces
 # are explicitly listed using the "bind" directive.
-protected-mode yes
+protected-mode no
 
 # Accept connections on the specified port, default is 6379 (IANA #815344).
 # If port 0 is specified Redis will not listen on a TCP socket.
@@ -133,7 +133,7 @@ tcp-keepalive 300
 
 # By default Redis does not run as a daemon. Use 'yes' if you need it.
 # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
-daemonize no
+daemonize yes
 
 # If you run Redis from upstart or systemd, Redis can interact with your
 # supervision tree. Options: