聪明屋视角

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

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

时间:2019-02-17 13:39:55    阅读:55388次 分类:解决方案
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。

芜湖市聪明屋智能科技有限公司依托本地规模较大的专业技术团队,专注于数字化与智慧化解决方案研发及落地实施。公司核心产品覆盖商管ERP系统、小票数据采集系统、涉案车辆管理系统、智慧园区系统、智慧农贸系统、低空经济平台、资产管理系统、数字孪生系统、公路养护系统、家政服务系统、警服体验系统、生态警务系统等多领域行业应用,并专业开展AI智能体开发、小程序定制开发及智能硬件定制服务,以成熟技术体系与项目实施能力,为政务、交通、园区、商业、民生等多场景提供一体化、高可靠的数字化解决方案。

聪明屋智能