通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
新建一个专门存放配置的文件夹`/config_nginx` 在nginx.config原配置中加入 `inclued nginx_config1.config` 新建一个配置文件nginx_config1.config 将server块复制一份粘帖进nginx_config1.config 修改这个配置 ~~~ server { # 端口改下 listen 8080 default_server; #listen [::]:80 default_server ipv6only=on; #server_name _; 这个也可以改下 server_name www.baidu.com; #这个也可以改下 index index.html index.htm index.php; root /home/wwwroot; charset utf -8; #error_page 404 /404.html; # Deny access to PHP files in specific directory拒绝访问特定目录中的PHP文件 #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; } include enable-php.conf;    #Nginx 服务器开启status页面检测服务状态     #开启后在url地址后面加上nginx_staus location /nginx_status { stub_status on; access_log off; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /.well-known { allow all; } location ~ /\. { deny all; } #这个日志也要改下,不要和其他项目使用同一个日志文件 access_log /home/wwwlogs/access1.log; error_log /home/wwwlogs/nginx_error.log; } ~~~ 这样将每个项目配置一个,然后将日志也单独提取出来了,这样就可以很轻松的统计访问数据,如当天那个api访问最多。每个api的qps