lnmp1.4测试版 无法打开127.0.0.1
ubuntu16.04lnmp1.4测试版 安装成功后能正常访问127.0.0.1 及phpmyadmin继续安装了部分python插件库、foxfire ssh代理插件,重启电脑后无法打开127.0.01/localhost,换chrome浏览器也不行
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
nginx (pid ) is running...
php-fpm is runing!
● mysql.service - LSB: start and stop MySQL
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: active (running) since 三 2017-04-26 12:26:52 CST; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 988 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysql.service
├─1007 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/loc...
└─1493 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --da...
4月 26 12:26:44 cheng-OptiPlex-9020-AIO systemd: Starting LSB: start and ...
4月 26 12:26:45 cheng-OptiPlex-9020-AIO mysql: Starting MySQL
4月 26 12:26:52 cheng-OptiPlex-9020-AIO mysql: ....... *
4月 26 12:26:52 cheng-OptiPlex-9020-AIO systemd: Started LSB: start and s...
Hint: Some lines were ellipsized, use -l to show in full.
直接使用php 访问网页是可行的,
password for cheng:
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
nginx (pid ) is running...
php-fpm is runing!
● mysql.service - LSB: start and stop MySQL
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: active (running) since 三 2017-04-26 12:26:52 CST; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 988 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysql.service
├─1007 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/loc...
└─1493 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --da...
4月 26 12:26:44 cheng-OptiPlex-9020-AIO systemd: Starting LSB: start and ...
4月 26 12:26:45 cheng-OptiPlex-9020-AIO mysql: Starting MySQL
4月 26 12:26:52 cheng-OptiPlex-9020-AIO mysql: ....... *
4月 26 12:26:52 cheng-OptiPlex-9020-AIO systemd: Started LSB: start and s...
Hint: Some lines were ellipsized, use -l to show in full.
........
请教。 重启后无法访问的时候,ps aux 看一下进程,是否有nginx、php-fpm、mysql
netstat -ntl 或ss -ntl 看一下端口
iptables -L -n 看一下防火墙规则
回复 2# 的帖子
非正常重启后,nginx进程没起来。 cheng@cheng-OptiPlex-9020-AIO:~/PythonProject$ netstat -ntlActive Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
cheng@cheng-OptiPlex-9020-AIO:~/PythonProject$ ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 5 127.0.0.1:631 *:*
LISTEN 0 50 *:3306 *:*
LISTEN 0 5 127.0.1.1:53 *:*
LISTEN 0 5 ::1:631 :::*
sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all--0.0.0.0/0 0.0.0.0/0
ACCEPT all--0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT tcp--0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT tcp--0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp--0.0.0.0/0 0.0.0.0/0 tcp dpt:443
DROP tcp--0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
ACCEPT icmp --0.0.0.0/0 0.0.0.0/0 icmptype 8
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
回复 4# 的帖子
看前面信息是nginx没启动,/usr/local/nginx/sbin/nginx -t 看一下如果配置文件没问题的话,可以按下面修改一下
有时候nginx无法启动的话可以编辑 /etc/rc.local 在exit 0 前面加上一行 /etc/init.d/nginx start
页:
[1]