Search code examples
phpxampp

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


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?


Solution

  • 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