简体   繁体   中英

Do I need to add * to listen :80/Listen []:80 for ipv4 and ipv6 WAMP virtual host setup

So here is the deal. I'm trying to setup Virtual host with my WAMP.

The instructions I found online tell me to set Listen :80 to Listen *:80 .

But when I check my httpd.conf file I only see

Listen 0.0.0.0:80
Listen [::0]:80

I have no idea what 0.0.0.0 and [::0] mean.

So my question is do they mean the same as * ? Or should i change

Listen 0.0.0.0:80
Listen [::0]:80

to

Listen 0.0.0.0*:80
Listen [::0]*:80

or add below those Listen *:80 ?

Or do I not need to add it at all..?

Thanks in advance!

update: I guess 0.0.0.0:80 is ipv4 and [::0]:80 is ipv6

But I still have no idea if I need to add Listen *:80 and/or Listen [*]:80 or something similar...

any ideas or advice would be greatly appreciated.

Thanks again!

I dont know what you found online, but here is the official instructions.

If you are using WAMPServer pre V3 :

WAMPServer Forum: THE NEED for VIRTUAL HOSTS

If you are using WAMPServer V3, the process has been made simpler and there is now a web page to do almost all of it for you

WAMPServer Forum: WAMPServer 3 All you need to know

The *:80 is used on the Virtual Host definition and not on the Listen directives in httpd.conf

The * means listen on any ip address, and is simpler than specifying your actual IP Address. As most Windows PC's have only one IP address ie only one network card there is no need t be specific with the ip address.

Go to httpd.conf and do the next

#Listen 12.34.56.78:80
Listen 127.0.0.1:8080
#Listen 0.0.0.0:80
#Listen [::0]:80

and where you find

ServerName localhost:80

write

ServerName localhost:8080

That way I resolved my problem with apache service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM