聪明屋视角

关注互联网,关注技术开发,透析与分享移动互联网行业最新动态

windows apache多端口虚拟主机配置方法

时间:2019-02-17 13:39:55    阅读:54549次 分类:解决方案
1、安装wampserver2.2d_x32_zol.zip,默认目录; 2、新建数据库,修改数据库默认密码; 3、php.ini修改警告级别,error_reporting=e_all & ~e_notice 4、httpd.conf修改 include conf/extra/httpd-vhosts.conf删除前面的# options followsymlink...

1、安装wampserver2.2d_x32_zol.zip,默认目录;


2、新建数据库,修改数据库默认密码;


3、php.ini修改警告级别,error_reporting=E_ALL &  ~E_NOTICE


4、httpd.conf修改


Include conf/extra/httpd-vhosts.conf删除前面的#


<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    #Deny from all
    Allow from all
</Directory>




#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all
</Directory>


修改端口
Listen 8000
ServerName localhost:8000


5、C:\wamp\wamp\wampmanager.tpl,3个地方修改http://localhost:8000,设置端口;


6、打开C:\wamp\bin\apache\Apache2.2.21\conf\extra目录httpd-vhosts.conf文件


NameVirtualHost *:8000


<VirtualHost *:8000>
ServerAdmin root@exmaple.com
ServerName www1.youfish.net
DocumentRoot C:/wamp/www/YOUYU/m.youfish.net
DirectoryIndex index.php index.html index.htm
</VirtualHost>


<VirtualHost *:8000>
ServerAdmin root@exmaple.com
ServerName img1.youfish.net
DocumentRoot C:/wamp/www/YOUYU/imana.youfish.net/imgs
DirectoryIndex index.php index.html index.htm
</VirtualHost>


<VirtualHost *:8000>
ServerAdmin root@exmaple.com
ServerName imana1.youfish.net
DocumentRoot C:/wamp/www/YOUYU/imana.youfish.net/root
DirectoryIndex index.php index.html index.htm
</VirtualHost>


<VirtualHost *:8000>
ServerAdmin root@exmaple.com
ServerName m1.youfish.net
DocumentRoot C:/wamp/www/YOUYU/m.youfish.net
DirectoryIndex index.php index.html index.htm
</VirtualHost>


<VirtualHost *:8000>
ServerAdmin root@exmaple.com
ServerName s1.youfish.net
DocumentRoot C:/wamp/www/YOUYU/s.youfish.net/root
DirectoryIndex index.php index.html index.htm
</VirtualHost>


<VirtualHost *:8000>
ServerAdmin root@exmaple.com
ServerName t1.youfish.net
DocumentRoot C:/wamp/www/YOUYU/t.youfish.net
DirectoryIndex index.php index.html index.htm
</VirtualHost>


7、打开C:\wamp\alias\phpmyadmin.conf,修改phpmyadmin访问权限
<Directory "c:/wamp/apps/phpmyadmin3.4.10.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
Allow from all
Allow from 127.0.0.1
</Directory>


8、打开C:\Windows\System32\drivers\etc\hosts,修改绑定网址
127.0.0.1       www1.youfish.net
127.0.0.1       m1.youfish.net
127.0.0.1       s1.youfish.net
127.0.0.1       t1.youfish.net
127.0.0.1       img1.youfish.net
127.0.0.1       imana1.youfish.net
127.0.0.1       localhost


9、打开C:\wamp\apps\phpmyadmin3.4.10.1\config.inc.php,修改$cfg['Servers'][$i]['password'] = '123123a';数据库密码


10、wampserver,PHP->PHP extensions,选中php_curl选项;


11、重启wampserver。


芜湖市聪明屋智能科技有限公司(原中江网络),成立于2005年,经过10多年定制开发经验,积累了大量技术储备和定制开发经验,率先创建安徽省内自主研发的云计算平台,具有大数据、高并发等高强度计算能力,为众多政府、学校、公安部门、中小企业解决数据计算与管理难题。2013年公司内部专门创建电商服务部,为企业提供全方位电商解决方案与配套服务。多次获得国家、省市级领导接见,被国内近20家电视台、报纸媒体争相报道。至今,聪明屋智能科技服务过上市公司、大型国企、各类私企超800家,为多家公司提供各类政务系统、app开发定制、微信小程序开发定制、智能家居、电商系统、连锁收银等技术解决方案服务。同时,聪明屋智能科技在智能硬件方面、区块链应用方面持续投入关注及创新。

聪明屋智能科技