V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  kmdd33  ›  全部回复第 3 页 / 共 15 页
回复总数  293
1  2  3  4  5  6  7  8  9  10 ... 15  
@ytlm 请问 openresty 如何查看 debug 日志,我之前是 yum 安装的 openresty
@torbrowserbridge 注释掉也不行
@0312birdzhang 请问 nginx 的 error.log 只能显示到 6.26 号,没有昨天和今天的错误日志
@0312birdzhang systemctl status openresty 正常啊现在
@orangutan92

waf configure.lua 的配置文件如下:



--WAF config file,enable = "on",disable = "off"

--waf status
config_waf_enable = "on"
--log dir
config_log_dir = "/tmp"
--rule setting
config_rule_dir = "/usr/local/openresty/nginx/conf/waf/rule-config"
--enable/disable white url
config_white_url_check = "on"
--enable/disable white ip
config_white_ip_check = "on"
--enable/disable block ip
config_black_ip_check = "on"
--enable/disable url filtering
config_url_check = "on"
--enalbe/disable url args filtering
config_url_args_check = "on"
--enable/disable user agent filtering
config_user_agent_check = "on"
--enable/disable cookie deny filtering
config_cookie_check = "on"
--enable/disable cc filtering
config_cc_check = "on"
--cc rate the xxx of xxx seconds
config_cc_rate = "1200/60"
--enable/disable post filtering
config_post_check = "on"
--config waf output redirect/html
config_waf_output = "html"
--if config_waf_output ,setting url
config_waf_redirect_url = "https://www.unixhot.com"
config_output_html=[[
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<title>网站防火墙</title>
</head>
<body>
<h1 align="center"> 欢迎白帽子进行授权安全测试,安全漏洞请联系 QQ:1111111。
</body>
</html>
]]
@orangutan92 请问你是如何解决的呢?
@juzipeek nginx.conf 的配置:




#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

client_max_body_size 8m; #允许客户端请求的最大单文件字节数
client_body_buffer_size 2m; #缓冲区代理缓冲用户端请求的最大字节

gzip on;
#WAF
lua_shared_dict limit 50m;
lua_package_path "/usr/local/openresty/nginx/conf/waf/?.lua";
init_by_lua_file "/usr/local/openresty/nginx/conf/waf/init.lua";
access_by_lua_file "/usr/local/openresty/nginx/conf/waf/access.lua";

server {
listen 127.0.0.1;
server_name mywebsitedomain.com;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.php index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}
网站是正常显示的状态,配置是:centos7+openresty +csf firewall+php7+mysql
csf 防火墙里面的配置文件,固定 ip 访问次数我设置的很高啊,waf 里面设置的 120/60,
@soho176 工具确实不兼容
Tap&Go,虚拟信用卡,没有超额消费,但是可以用来在网上购买海外的 vps,亲测 linode 可以用。
2018-06-14 18:04:07 +08:00
回复了 kmdd33 创建的主题 程序员 mysql 启动失败
@GTim @tan90 @JHerschel 谢谢,已经解决
@xuyl php-fpm 是运行的状态
输入:netstat -lntp | grep 9000

却没有任何提示
输入:netstat -lntp | grep 9000

没有任何提示
刚才把/ etc / php-fpm.d / www.conf 里面改成了:

listen = /var/run/php-fpm/php-fpm.sock
listen = 9000

改成了:listen = 127.0.0.1

php-fpm 启动正常。但是但是 ip/info.php 无法显示,并且无法进入安装程序 ip/install 目录
@laobaozi @dorothyREN 刚才添加了 nginx 这个用户,启动成功,谢谢。
@Nitroethane 重新输入 systemctl status php-fpm.service -l

请问这里面的哪个错误引起的不能启动 php-fpm



systemctl status php-fpm.service -l
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-06-08 18:25:43 UTC; 13h ago
Process: 2236 ExecStart=/usr/sbin/php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf (code=exited, status=78)
Main PID: 2236 (code=exited, status=78)

Jun 08 18:25:43 servername systemd[1]: Starting The PHP FastCGI Process Manager...
Jun 08 18:25:43 servername php-fpm[2236]: [08-Jun-2018 18:25:43] ERROR: [pool www] cannot get uid for user 'nginx'
Jun 08 18:25:43 servername php-fpm[2236]: [08-Jun-2018 18:25:43] ERROR: FPM initialization failed
Jun 08 18:25:43 servername systemd[1]: php-fpm.service: main process exited, code=exited, status=78/n/a
Jun 08 18:25:43servername systemd[1]: Failed to start The PHP FastCGI Process Manager.
Jun 08 18:25:43 servername systemd[1]: Unit php-fpm.service entered failed state.
Jun 08 18:25:43 servername systemd[1]: php-fpm.service failed.
@zqcolor

这是完整的 error.log 信息:

2018/06/08 18:14:11 [error] 825#825: *31 connect() failed (111: Connection refused) while connecting to upstream,
client: 103.242.0.73, server: 173.255.247.37, request: "GET /pma/index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxx.xxx.xxx.xx"
@lolizeppelin php7 和 php-fpm 都是 yum 安装的
netstat -ant | grep 9000 没有任何提示
1  2  3  4  5  6  7  8  9  10 ... 15  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2714 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 20ms · UTC 10:04 · PVG 18:04 · LAX 02:04 · JFK 05:04
Developed with CodeLauncher
♥ Do have faith in what you're doing.