wamp2.5配置多端口虚拟主机的方法
前几天配置wamp多端口访问网站,结果网上找了好多,根本行不通。
根本不是自己配置出来的。
大都是一个模子里面盗出来的。
那些方法还是wamp1.x版本好不好?
1.保证httpd.conf下
LoadModule php5_module "D:/E/php/wamp/bin/php/php5.5.12/php5apache2_4.dll" PHPIniDir D:/E/php/wamp/bin/php/php5.5.12
这两个没被注释掉
2.打开多站点配置:
httpd.conf下面:Include conf/extra/httpd-vhosts.conf 去掉前面注释
3.httpd.conf下监听端口
(这个好像原来老版本不是这样配置的。所以模仿第一个80的端口,可以写出8080的端口)
Listen 0.0.0.0:80 Listen [::0]:80 #listen to 8080 Listen 0.0.0.0:8080 Listen [::0]:8080
4.http-vhosts.conf配置
(注意 Require all granted,不要写成什么allow from all什么的。可以参考httpd.conf中的写法。)
ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "D:/E/php/wamp/think" ServerName localhost ServerAlias localhost ErrorLog "logs/dummy-host2.example.com-error.log" CustomLog "logs/dummy-host2.example.com-access.log" common Options Indexes FollowSymLinks AllowOverride all Require all granted ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "D:/E/php/wamp/www" ServerName localhost ServerAlias localhost ErrorLog "logs/dummy-host2.example.com-error.log" CustomLog "logs/dummy-host2.example.com-access.log" common Options Indexes FollowSymLinks AllowOverride all Require all granted
注意修改正确的项目根目录
D:/E/php/wamp/www 和 D:/E/php/wamp/think
注意
Require all granted不要写成 allow from all 之类的。
apache版本高了 语法也变了。
现在可以访问 localhost:80和localhost:8080了
原生态js实现ajax的get和post的方法介绍 ASP插件Jmail全部方法属性详解
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://www.binance.info/sl/register?ref=PORL8W0Z
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article. https://www.binance.info/pt-BR/register-person?ref=YY80CKRN