Posts Tagged ‘lnmp’

LNMP下修改rewrite

xeon Posted in Computer Technical,Tags: , ,
0

由于军哥的LNMP有设置多个虚拟机的批处理,我又不需要。所以没办法把原来写好的wordpress.conf rewrite的文件包含进来。修改nginx.conf,将wordpress.conf 加进来即可。记住,这个仅适用于军哥的LNMP

server
{
listen       80;
server_name www.xeonlin.com;
index index.html index.htm index.php;
root  /home/wwwroot;
include wordpress.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_pass  unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}

location /status {
stub_status on;
access_log   off;
}

/usr/local/nginx/sbin/nginx -s reload 重启即可

虚拟机中的LNMP无法访问

xeon Posted in Computer Technical,Tags: , ,
0

故障现象:
环境:用LNMP架设一个web服务器在centos下,用的是vm虚拟机。
安装完毕后发现无法通过本机输入IP访问web服务器。
1.两机互ping正常。
2.centos中直接访问127.0.0.1页面显示。正常。
3.用主机访问虚拟机对应的ip无法打开。
4.安装时主机地址输入的是127.0.0.1
5.安装包没做任何其他设置。

经高手指点,关掉iptables,即:service iptables stop

iptables
iptables是支持IPv4的一个内置的防火墙。
-L
-list      
显示所选链的所有规则
-D -delete   从所选链中删除一条或更多规则
-A -append   在所选择的链末添加一条或更多规则。

LNMP下无法访问phpmyadmin

xeon Posted in Computer Technical,Tags: ,
0

提示”Wrong permissions on configuration file, should not be world writable!”

1.全部执行chmod 755 或777都无果

将写的权限去除即可。

chmod a-w config.inc.php