容器技术交流

 找回密码
 立即注册
查看: 4173|回复: 5

绑定网站目录及伪静态问题求救

[复制链接]
发表于 2011-2-19 01:20:41 | 显示全部楼层 |阅读模式
已经成功的搭建好环境, 上传好程序, 有2个问题求教

我用的PHP用Apache处理
1 把shopex文件夹改名为1 上传到/home/ftp//wwwroot里只有输入域名www.abc.com/1才能打开网站, 我想直接输入域名www.abc.com打开网站, 请问怎么修改??我改/usr/local/nginx/conf/vhost.conf中的
server {
server_name   www.abc.com ;
location / {
  # proxy_pass [:proxy_pass:];
  index  index.html index.htm index.shtml index.php;
  autoindex off;
  ssi off;
  ssi_silent_errors off;
  ssi_types text/shtml;
  
}

root   /home/ftp/1520/yinzhou-20110218094225-oBJrAK/wwwroot/1/;
对吗,如果对, 为什么重启nginx又变回默认了  请教怎么修改??

22怎么添加伪静态???
装的shopex。。在Nginx扩展设置中加的shopex 伪静态规则
location / {
if (!-e $request_filename) {
rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last;
}
}
确认修改成功
可是网站后台开启照样失败,我自己配置环境同样的规则是可以的,怎么添加伪静态???
发表于 2011-2-19 10:29:04 | 显示全部楼层
1. 新建一个网站,将网站所在的目录便可,而不是传到/home/ftp/wwwroot下,当然也可以传到wwwroot/1目录下

2.
不要带location,直接:
if (!-e $request_filename) {
rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last;
}
 楼主| 发表于 2011-2-19 20:49:27 | 显示全部楼层
本帖最后由 mm111111 于 2011-2-19 20:51 编辑

1新建一个网站,将网站所在的目录便可是什么意思?说的详细些 我是在管理后台 快速建站, 然后用WinSCP上传到/home/ftp//wwwroot里面,只有输入域名www.abc.com/1才能打开网站,

2照你说的也做了, 还是无法开启伪静态

也重启了
发表于 2011-2-20 10:09:11 | 显示全部楼层
/home/ftp//wwwroot
这个网站目录错了
 楼主| 发表于 2011-2-20 18:33:40 | 显示全部楼层
我是用WinSCP上传到/home/ftp/1520/yinzhou-20110218094225-oBJrAK/wwwroot/1里的, 请问要上传到哪里???
希望安装教程说明仔细点, 毕竟菜鸟比较多
发表于 2011-2-20 18:46:14 | 显示全部楼层
5# mm111111
如果不是放在根目录下,而是放在1下,伪静态也不一样了,你试一下
if (!-e $request_filename) {
rewrite ^/1/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /1/index.php?$1 last;
}
不好意思,要过一段时间才有条件编写教程。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-5-12 11:33 , Processed in 0.036580 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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