首页   注册   登录
 kmdd33 最近的时间轴更新

kmdd33

V2EX 第 193419 号会员,加入于 2016-09-25 21:36:42 +08:00
print("深圳攻城狮内推+跳槽微信群")
深圳  •  kmdd33  •  26 天前  •  最后回复来自 huai
5
kmdd33 最近回复了
3 天前
回复了 RiESA 创建的主题 CDN 大佬们有没有免备案的 CDN 推荐?
Cloudflare 满良心的
@aLazarus Google pwa?感谢各位,我都去试一下
@分叉一条链早晚会出现,正如 zcash founder 不满 bitcoin 的隐私,byteball founder 不满 bitcoin 的速度。相互制约,相互竞争才对的起“去中心化” 这个词。
20 天前
回复了 terrywater 创建的主题 分享创造 开源 BSD 协议 - fecshop - 开源电商 b2c
@terrywater 有没有计划加入多商家店铺的功能?方便让更多的卖家入住?
刚解决掉,贴出解决步骤:

# service openresty stop

Stopping openresty (via systemctl): [ OK ]

[root@li1165-57 ~]# ps ax |grep nginx

648 pts/1 S+ 0:00 grep --color=auto nginx
5974 ? S 0:04 nginx: worker process

[root@li1165-57 ~]# ps ax | grep nginx
651 pts/1 S+ 0:00 grep --color=auto nginx
5974 ? S 0:04 nginx: worker process

[root@li1165-57 ~]# ps ax | grep nginx

653 pts/1 S+ 0:00 grep --color=auto nginx
5974 ? S 0:04 nginx: worker process

[root@li1165-57 ~]# sudo kill -2 5974 (最终要的命令,杀死正在进行中的 nginx 进程)

[root@li1165-57 ~]# sudo kill -2 5974

kill: sending signal to 5974 failed: No such process

[root@li1165-57 ~]# ps ax | grep nginx

694 pts/1 S+ 0:00 grep --color=auto nginx

[root@li1165-57 ~]# service openresty restart

Restarting openresty (via systemctl): [ OK ]

[root@li1165-57 ~]# systemctl status openresty

● openresty.service - SYSV: OpenResty is a scalable web platform by extending
Loaded: loaded (/etc/rc.d/init.d/openresty; bad; vendor preset: disabled)
Active: active (running) since Thu 2018-07-12 13:21:32 UTC; 31s ago
Docs: man:systemd-sysv-generator(8)
Process: 9983 ExecStop=/etc/rc.d/init.d/openresty stop (code=exited, status=0/SUCCESS)
Process: 721 ExecStart=/etc/rc.d/init.d/openresty start (code=exited, status=0/SUCCESS)
Main PID: 737 (nginx)
CGroup: /system.slice/openresty.service
├─737 nginx: master process /usr/local/openresty/nginx/sbin/nginx -c /usr/local/ope...
└─739 nginx: worker process

Jul 12 13:21:32 li1165-57.members.vultr.com systemd[1]: Starting SYSV: OpenResty is a scalab....
Jul 12 13:21:32 li1165-57.members.vultr.com openresty[721]: Starting nginx: [ OK ]
Jul 12 13:21:32 li1165-57.members.vultr.com systemd[1]: PID file /usr/local/openresty/nginx/....
Jul 12 13:21:32 li1165-57.members.vultr.com systemd[1]: Started SYSV: OpenResty is a scalabl....
Hint: Some lines were ellipsized, use -l to show in full.
[root@li1165-57 ~]#
# ps ax | grep nginx
5974 ? S 0:03 nginx: worker process
32605 pts/0 S+ 0:00 grep --color=auto nginx
@chrisyunhua


# sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 5974/nginx: worker
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5974/nginx: worker
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 730/sshd
tcp6 0 0 :::9000 :::* LISTEN 4961/php-fpm: pool
tcp6 0 0 :::3306 :::* LISTEN 3299/mysqld
tcp6 0 0 :::80 :::* LISTEN 5974/nginx: worker
tcp6 0 0 :::22 :::* LISTEN 730/sshd
@0312birdzhang 解决了,谢谢
同意谢谢各位。在 stackoverflow 上面找到了答案:

解决步骤:

1.在 nginx.conf 中把 error_log and pid 前面的注释去掉。 就像这样,方便得出正确的 error.log

user root;
worker_processes 1;

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

pid logs/nginx.pid;

2.http{}里面的 80 端口正确配置方式是:

listen 80;
listen [::]:80 default_server;

3.检查哪个 pid 占用了 80 端口:809 这个进程占用了 80 端口

# sudo netstat -tulpn | grep --color :80
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 809/nginx: master p
[root@li1382-238 ~]# sudo kill -2 809 (这个命令很重要)
[root@li1382-238 ~]# sudo netstat -tulpn | grep --color :80
[root@li1382-238 ~]# openresty
[root@li1382-238 ~]# openresty -t

# netstat -antp 这个命令也可以查出来哪个端口占用了 80 端口。

然后重启:openresty
sudo fuser -k 80/tcp 尝试执行这个命令:
sudo: fuser: command not found
关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   鸣谢   ·   实用小工具   ·   888 人在线   最高记录 3762   ·  
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.1 · 17ms · UTC 18:04 · PVG 02:04 · LAX 11:04 · JFK 14:04
♥ Do have faith in what you're doing.
沪ICP备16043287号-1