Search code examples
apachewebserverwamp

How to configure httpd.conf in wamp so others can reach my webserver online


I wish to set up a webpage for testing purposes on a PC with wamp (I know it is not recommended).

I followed this guide: https://www.youtube.com/watch?v=b50hB7cfsfg

But if I change the default settings in httpd.conf:

listen 0.0.0.0:80
to my IP:
listen xxx.x.xxx.212

and

ServerName localhost:80
to
toServerName xxx.x.xxx.212

and

<Directory />     
    AllowOverride none     
    Require all denied 
</Directory> 

to

<Directory />
    Order Deny,Allow
    Deny from all
</Directory>

Then restart wamp, I get the following Error:

There is a syntax error in Apache conf files.
AH00526: Syntax error on line 70 of C:/wamp64/bin/apache/apache2.4.54.2/conf/httpd.conf:
Port must be specified

What should I do to correct this error?

I found many topic whit simmilar problems but they were outdated.
(I installed wamp 3.3.0)


Solution

  • Put back :80 for the listen directive where it’s required to specify the port.

    You don’t need to be specific about the IP address there. listen 0.0.0.0:80 would work fine meaning listen on port 80 for all IP addresses.