Home > database >  www.example.com:443:0 server certificate does NOT include an ID which matches the server name
www.example.com:443:0 server certificate does NOT include an ID which matches the server name

Time:11-13

When I try to open the localhost I see ( Not Found

The requested URL was not found on this server. ) and after checking the Apache(error.log) on xampp I found this message ( www.example.com:443:0 server certificate does NOT include an ID which matches the server name )

at first, I made sure that the Apache server was actually running, after that, I looked for some answers, and kinsta.com recommended adding ( ServerName localhost: port number ) to httpd-ssl.conf file, but I still get the same error, I have changed the port number many times but still, have the same issue.

this is my first time working with xampp and PHP, any ideas?

CodePudding user response:

For XAMPP, to fix this problem

  • launch the XAMPP Control Panel
  • click Explorer button (This will open a file browser window in the XAMPP folder)
  • navigate to apache > conf > extra
  • Edit the httpd-ssl.conf
  • look for the line that reads “ServerName www.example.com:443”, comment it out (add a # at the front of this line)
  • Add “ServerName localhost” on the line directly below it, save the file
  • Restart Apache (stop and then start it) thru the XAMPP Control Panel

CodePudding user response:

Worked after:

  • launch the XAMPP Control Panel

  • Click the Explorer button (This will open a file browser window in the XAMPP folder)

  • navigate to apache > conf > extra

  • And edited the httpd.conf

  • I've looked for the line that reads “Listen 80”, and Changed it to “Listen 81

  • Also looked for the line that reads “ServerName localhost:80”, Changed it to “ServerName localhost:81

  • Restart Apache (stop and then start it) thru the XAMPP Control Panel

Thank you Ken Lee for your helpful answer

  • Related