您的位置:首页 > 移动开发

Windows下LAMP集成环境AppServ虚拟目录配置方法及错误处理

2012-06-11 11:23 921 查看
LAMP集成环境AppSerLAMP集成环境AppServ虚拟目录配置方法 http://anjor.iteye.com/blog/9097801.首先下载AppServ安装包,地址:http://cdnetworks-kr-2.dl.sourceforge.net/project/appserv/AppServ%20Open%20Project/2.5.10/appserv-win32-2.5.10.exe 2.安装完成后,开始配置虚拟目录 3.打开appserv的安装目录,找到httpd.conf文件,分别去掉下面两行文字前面的#号。   #LoadModule vhost_alias_module modules/mod_vhost_alias.so    去掉#意思是启用apache的虚拟主机功能。 #Include conf/extra/httpd-vhosts.conf   去掉这一行的#意思是从conf/extra/httpd-vhosts.conf这个文件导入虚拟主机配置。 4.打开extra目录内的httpd-vhosts.conf文件,在文件底部加入自己要加的虚拟主机的信息。 首先将最低下一行代码去掉: Java代码 <VirtualHost *:80> ServerAdmin webmaster@dummy-host.appservnetwork.com DocumentRoot /www/docs/dummy-host.appservnetwork.com ServerName dummy-host.appservnetwork.com ServerAlias www.dummy-host.appservnetwork.com ErrorLog logs/dummy-host.appservnetwork.com-error_log CustomLog logs/dummy-host.appservnetwork.com-access_log common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@dummy-host2.appservnetwork.com DocumentRoot /www/docs/dummy-host2.appservnetwork.com ServerName dummy-host2.appservnetwork.com ErrorLog logs/dummy-host2.appservnetwork.com-error_log CustomLog logs/dummy-host2.appservnetwork.com-access_log common </VirtualHost> 然后加入自己需要的虚拟努力配置: Java代码 <VirtualHost *:80> ServerAdmin anjor_web@163.com DocumentRoot "D:/AppServ/www/ikaku_html" ServerName www.ikaku.com ErrorLog D:/AppServ/www/ikaku_html/error.log </VirtualHost> <VirtualHost *:80> ServerAdmin anjor_web@163.com DocumentRoot "D:/AppServ/www/ikaku_design" ServerName static.ikaku.com ErrorLog D:/AppServ/www/ikaku_design/error.log </VirtualHost> 有些可能需要使用目录权限: Java代码 <Directory D:/> Options Indexes AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> 5.修改本机hosts文件,方便解析域名,hosts文件地址:C:\WINDOWS\system32\drivers\etc 加入要解析的域名 127.0.0.1 static.ikaku.com www.ikaku.com ######################################################配置好启动apache过程中出现错误提示:1、(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: could not bind to address 0.0.0.0:1213no listening sockets available, shutting downUnable to open logs解决方法:1:通过 netstat -anb 查看端口占用情况,关闭调用相关端口的进程 通过查看发现iis默认网站打开了占用了80端口,停止掉好了。2:通过 修改conf/httpd.conf 中相应的监听端口来处理。=====================================================2、弹出窗口提示:找不到php_mbstring.dll,apache无法启动!解决方法:或提示找不到php_mbstring.dll,都可以用下面的方法解决.mb_开头的函数是为了解决像utf-8这样多字节字符的截取与长度等操作的,如果直接用substr则常出现最后一个字符的乱码(即截取了半个汉字)首先安装php_mbstring.dll,它是放在php目录的 ext文件夹下的,确保在php.ini文件中加载extension=php_exif.dll前先加载extension=php_mbstring.dll,即:extension=php_mbstring.dll 在前extension=php_exif.dll 在后.否则在命令行启动时总会提示:“找不到php_mbstring.dll”.####################################################另外一个apache虚拟主机配置样例:NameVirtualHost *:80<VirtualHost *:80> ServerAdmin 123456@qq.comDocumentRoot D:\AppServ\www\ServerName new.0574-office.comServerAlias new.0574-office.comDirectoryIndex index.html index.htm index.php<Directory "D:\AppServ\www\"> AllowOverride None Options FollowSymLinks Order allow,deny Allow from all</Directory></VirtualHost>#########################################其他参考资料:windows下利用apache配置WEB站点 - .\Best - 51CTO技术博客 http://best0.blog.51cto.com/444987/98793PHP环境配置:Windows下AppServ配置与安装使用教程 | PHP网站开发-PHP教程-LeapSoul.CN http://www.leapsoul.cn/?p=292v虚拟目录配置方法
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐