VPS侦探论坛

 找回密码
 注册
查看: 9058|回复: 6

[Apache] 小白提问:如何把wordpress定向到主页?

[复制链接]
发表于 2012-11-16 10:30:46 | 显示全部楼层 |阅读模式

装了lnmp一键安装包,然后找了教程装了wordpress现在的问题是,打开主页,显示的是 lnmp成功安装的页面:恭喜,LNMP一键安装包安装成功
而wordpress 需要在 www.homepage.com/wordpress 才能打开。。
我想打开主页 www.homepage.com 直接就打开wordpress, 如何操作呢??
小白拜谢了。。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-11-16 10:57:25 | 显示全部楼层


你非要把wordpress放二级目录,那肯定得加上二级目录wordpress才能访问了

winscp将wordpress下的目录及文件移至wordpress的上一级目录。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-11-17 16:18:30 | 显示全部楼层

回复 2# 的帖子


已经把wordpress放到 /home/wwwoot/www.92zjx.com 里了
但是打开 www.92zjx.com 还是出现404.。。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-11-17 16:20:28 | 显示全部楼层



看了配置文件也没问题。。。
server
        {
                listen       80;
                server_name www.92zjx.com 92zjx.com;
                index index.html index.htm index.php default.html default.htm default.php;
                root  /home/wwwroot/www.92zjx.com;

                include wordpress.conf;
                location ~ .*.(php|php5)?$
                        {
                                try_files $uri =404;
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-11-17 16:21:17 | 显示全部楼层

看了配置文件也没问题。。。
server
        {
                listen       80;
                server_name www.92zjx.com 92zjx.com;
                index index.html index.htm index.php default.html default.htm default.php;
                root  /home/wwwroot/www.92zjx.com;

                include wordpress.conf;
                location ~ .*.(php|php5)?$
                        {
                                try_files $uri =404;
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2012-11-17 16:38:38 | 显示全部楼层

额,找到原因了,92zjx定义了两次,把/usr/local/nginx/conf/nginx.conf里绑定的删除就好了!
发表于 2012-11-20 12:21:01 | 显示全部楼层

可以用.htaccess也能实现的哈
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-4 20:49 , Processed in 0.027972 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表