DedeAMPZ多站点配置+支持.htaccess伪静态

dedeampz本地多占地配置方法:

 

 

----------------------------------------------

 

 

 

来源:http://www.webmaster5u.com/show.asp?id=1387

------------------------------

web站点配置

NameVirtualHost *:80

##VhostStart

# 这里默认站点的设置,未知域名如果IP与服务器一致,也会指向此站点
# 如果你想通过IP访问方式或非法域名不能访问你的服务,把这站点的目录设为一个不存在目录即可
<VirtualHost *:80>
ServerAdmin admin@myhost.com
DocumentRoot "E:/DedeAMPZ/WebRoot/Default"
php_admin_value open_basedir "E:/DedeAMPZ/WebRoot/Default"
ServerName localhost

ErrorLog logs/default-error_log
CustomLog logs/default-access_log common
</VirtualHost>

# 如果你要增加网站,把下面配置复制一份,修改目录和域名即可
<VirtualHost *:80>
ServerAdmin admin@myhost.com
ServerName www.test.com
ServerAlias test.com
DocumentRoot "E:/DedeAMPZ/WebRoot/test.com/WebRoot"
php_admin_value open_basedir "E:/DedeAMPZ/WebRoot/test.com/WebRoot"
ErrorLog logs/all-error_log
CustomLog logs/all-access_log common
</VirtualHost>

#第二个
<VirtualHost *:80>
ServerAdmin admin@myhost.com
ServerName www.abc.com
ServerAlias abc.com  #serverName的别名
DocumentRoot "E:/DedeAMPZ/WebRoot/abc.com"
php_admin_value open_basedir "E:/DedeAMPZ/WebRoot/abc.com"
ErrorLog logs/all-error_log
CustomLog logs/all-access_log common
</VirtualHost>
##VhostEnd

--------------------------------------------------------------

点击修改本地host文件,复制下面到里面即可:

 127.0.0.1        www.test.com
 127.0.0.1        www.abc.com

 ----------------------以下可以不看---------------------------------------------------------------------------------------

可能的错误

http://localhost/dede/ 

后台会提示:

php.ini 

register_globals must is Off!    那就修改一下php.ini的register_globals = Off

根本的解决方法是修改出错的php代码

 

----------------------------------------------------------------

本地配置方法2

 

 

 

NameVirtualHost *:80

 

<VirtualHost *:80>
ServerName localhost
DocumentRoot "D:/xamp/htdocs"
<Directory "D:/xamp/htdocs">
#Options Indexes dede网站搬家后的配置
Order allow,deny
Allow from all
Allowoverride all
#
DirectoryIndex index.php index.html default.html default.htm

 

</Directory>
</VirtualHost>

 

---------------

 

127.0.0.1 smarty.com
192.168.0.101 192.168.0.101
127.0.0.1 www.tpok.com
192.168.0.10 192.168.0.10
127.0.0.1 tp.com
127.0.0.1 oa.com

 

 

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/zff193/p/4118959.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值