Phpmyadmin无法访问
你好,我在VPS上安装好LNMP1.0以后就没管过了,一直都访问正常,但是上次不知道什么原因,现在phpmyadmin进不去,输入:IP/phpmyadmin 就是打不开,一直在转。原来正常的时候输入IP,是可以看到LNMP安装成功页面的,现在就是打不开。是什么原因呢?跟VPS方面练习,他们说机器正常。然后我重新添加了一个虚拟主机,用一个域名指向/home/wwwroot/default (phpmyadmin就在此目录),并在本地hosts绑定了这个域名访问,但是输入这个域名还是打不开。
查了 netstat -uplnt | less
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2414/sendmail: acce
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3614/mysqld
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 313/memcached
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16678/nginx: master
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 347/pure-ftpd (SERV
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1071/sshd
tcp6 0 0 :::11211 :::* LISTEN 313/memcached
tcp6 0 0 :::21 :::* LISTEN 347/pure-ftpd (SERV
tcp6 0 0 :::22 :::* LISTEN 1071/sshd
udp 0 0 0.0.0.0:56674 0.0.0.0:* 287/avahi-daemon: r
udp 0 0 0.0.0.0:11211 0.0.0.0:*
313/memcached
udp 0 0 10.99.0.10:123 0.0.0.0:*
312/ntpd
udp 0 0 108.61.196.83:123 0.0.0.0:*
312/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:*
312/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:*
312/ntpd
udp 0 0 0.0.0.0:5353 0.0.0.0:*
287/avahi-daemon: r
udp6 0 0 :::11211 :::*
313/memcached
udp6 0 0 fe80::5054:ff:fe8e::123 :::*
312/ntpd
udp6 0 0 ::1:123 :::*
312/ntpd
udp6 0 0 :::123 :::*
312/ntpd
还有nginx.conf配置:
userwww www;
worker_processes auto;
error_log/home/wwwlogs/nginx_error.logcrit;
pid /usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http
{
include mime.types;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
gzip on;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE \.";
#limit_conn_zone $binary_remote_addr zone=perip:10m;
##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.
server_tokens off;
#log format
log_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
{
listen 80 default;
#listen [::]:80 default ipv6only=on;
server_name www.lnmp.org;
index index.html index.htm index.php;
root/home/wwwroot/default;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location /nginx_status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log/home/wwwlogs/access.logaccess;
}
include vhost/*.conf;
}
重新弄得一个虚拟主机:简称domain1. 配置文件为:
server
{
listen 80;
#listen [::]:80;
server_name domain1.com www.domain1.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/default;
include other.conf;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log/home/wwwlogs/phpmyadmin.logaccess;
}
急啊!现在网站文件已经拷下来了,准备把sql弄下去,重新安装LNMP最新版,但是sql弄不下我恢复不了网站。非常感谢~~~!!! 在nginx.conf里,我曾经把 server_name改了domain2.com,并在本地绑定,还是不行。
server_name www.lnmp.org;
index index.html index.htm index.php;
root/home/wwwroot/default;
然后在网上查了资料,又说appach没有启动的,我也查了确实没启动,但是有nginx啊,原来也正常,就是不知道原因。 /usr/local/nginx/sbin/nginx -t 测试一下
检查iptables
vps上直接curl 你的ip 看是否正常 感谢军哥回复,并作如下操作。新手不懂还请海涵,说具体点。
1、/usr/local/nginx/sbin/nginx -t 测试结果如下:
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
2、使用iptables -nv -L 命令:
# iptables -nv -L
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
1547K181M ACCEPT all--* * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
5 504 ACCEPT all--lo * 0.0.0.0/0 0.0.0.0/0
172K 9444K INPUT_directall--* * 0.0.0.0/0 0.0.0.0/0
172K 9444K INPUT_ZONES_SOURCEall--* * 0.0.0.0/0 0.0.0.0/0
172K 9444K INPUT_ZONESall--* * 0.0.0.0/0 0.0.0.0/0
283 14533 ACCEPT icmp --* * 0.0.0.0/0 0.0.0.0/0
107K 5526K REJECT all--* * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all--* * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all--lo * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_directall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_IN_ZONES_SOURCEall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_IN_ZONESall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_OUT_ZONES_SOURCEall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_OUT_ZONESall--* * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT icmp --* * 0.0.0.0/0 0.0.0.0/0
0 0 REJECT all--* * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 1978K packets, 1525M bytes)
pkts bytes target prot opt in out source destination
1978K 1525M OUTPUT_directall--* * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD_IN_ZONES (1 references)
pkts bytes target prot opt in out source destination
0 0 FWDI_publicall--eth1 * 0.0.0.0/0 0.0.0.0/0
0 0 FWDI_publicall--eth0 * 0.0.0.0/0 0.0.0.0/0
0 0 FWDI_publicall--+ * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD_IN_ZONES_SOURCE (1 references)
pkts bytes target prot opt in out source destination
Chain FORWARD_OUT_ZONES (1 references)
pkts bytes target prot opt in out source destination
0 0 FWDO_publicall--* eth1 0.0.0.0/0 0.0.0.0/0
0 0 FWDO_publicall--* eth0 0.0.0.0/0 0.0.0.0/0
0 0 FWDO_publicall--* + 0.0.0.0/0 0.0.0.0/0
Chain FORWARD_OUT_ZONES_SOURCE (1 references)
pkts bytes target prot opt in out source destination
Chain FORWARD_direct (1 references)
pkts bytes target prot opt in out source destination
Chain FWDI_public (3 references)
pkts bytes target prot opt in out source destination
0 0 FWDI_public_logall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FWDI_public_denyall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FWDI_public_allowall--* * 0.0.0.0/0 0.0.0.0/0
Chain FWDI_public_allow (1 references)
pkts bytes target prot opt in out source destination
Chain FWDI_public_deny (1 references)
pkts bytes target prot opt in out source destination
Chain FWDI_public_log (1 references)
pkts bytes target prot opt in out source destination
Chain FWDO_public (3 references)
pkts bytes target prot opt in out source destination
0 0 FWDO_public_logall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FWDO_public_denyall--* * 0.0.0.0/0 0.0.0.0/0
0 0 FWDO_public_allowall--* * 0.0.0.0/0 0.0.0.0/0
Chain FWDO_public_allow (1 references)
pkts bytes target prot opt in out source destination
Chain FWDO_public_deny (1 references)
pkts bytes target prot opt in out source destination
Chain FWDO_public_log (1 references)
pkts bytes target prot opt in out source destination
Chain INPUT_ZONES (1 references)
pkts bytes target prot opt in out source destination
71991 IN_publicall--eth1 * 0.0.0.0/0 0.0.0.0/0
172K 9442K IN_publicall--eth0 * 0.0.0.0/0 0.0.0.0/0
2 480 IN_publicall--+ * 0.0.0.0/0 0.0.0.0/0
Chain INPUT_ZONES_SOURCE (1 references)
pkts bytes target prot opt in out source destination
Chain INPUT_direct (1 references)
pkts bytes target prot opt in out source destination
Chain IN_public (3 references)
pkts bytes target prot opt in out source destination
172K 9444K IN_public_logall--* * 0.0.0.0/0 0.0.0.0/0
172K 9444K IN_public_denyall--* * 0.0.0.0/0 0.0.0.0/0
172K 9444K IN_public_allowall--* * 0.0.0.0/0 0.0.0.0/0
Chain IN_public_allow (1 references)
pkts bytes target prot opt in out source destination
65635 3904K ACCEPT tcp--* * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ctstate NEW
Chain IN_public_deny (1 references)
pkts bytes target prot opt in out source destination
Chain IN_public_log (1 references)
pkts bytes target prot opt in out source destination
Chain OUTPUT_direct (1 references)
pkts bytes target prot opt in out source destination
3、curl IP 如下:
# curl IP
LNMP一键安装包 by Licess
恭喜,LNMP一键安装包安装成功!
http://lnmp.org/lnmp.gif
LNMP一键安装包是一个用Linux Shell编写的可以为CentOS/RadHat、Debian/Ubuntu VPS(VDS)或独立主机安装LNMP(Nginx、MySQL、PHP、phpMyAdmin)生产环境的Shell程序。
查看本地环境:探针 phpinfo phpMyAdmin(为了更安全,建议将phpmyadmin目录重命名为不容易猜到的目录!)
更多LNMP一键安装包信息请访问: http://lnmp.org
LNMP一键安装包问题反馈请访问: https://bbs.vpser.net/forum-25-1.html
VPS相关教程: https://www.vpser.net/vps-howto/
美国VPS推荐: https://www.vpser.net/usa-vps/
LNMP一键安装包 by Licess & VPS侦探 https://www.vpser.net/security/linux-iptables.html
要不就是iptables的问题,要不就是你服务商有限制
页:
[1]