search

Home  >  Q&A  >  body text

www.example.com:443:0 Server certificate does not contain an ID that matches the server name

When I try to open localhost I see (Not Found

The requested URL was not found on this server. ), after checking Apache(error.log) on ​​xampp, I found this message ( www.example.com:443:0 Server certificate does not contain an ID that matches the server name )

First, I made sure that the Apache server is indeed running. After that, I looked for some answers and kinsta.com suggested adding (ServerName localhost: port number) to httpd -ssl.conf file but I still get the same error, I have changed the port number multiple times but still have the same problem.

This is my first time using xampp and PHP, any ideas?

P粉236743689P粉236743689410 days ago856

reply all(2)I'll reply

  • P粉833546953

    P粉8335469532023-12-20 13:04:11

    For XAMPP, solve this problem

    • Start XAMPP Control Panel
    • Click the Explorer button (this will open a file browser window in the XAMPP folder)
    • Navigate to apache > conf > extra
    • Edit httpd-ssl.conf
    • Look for the line that reads "ServerName www.example.com:443" and comment it out (add # in front of the line)
    • Add "ServerName localhost" in the line directly below it and save the file
    • Restart Apache via XAMPP Control Panel (stop then start)

    reply
    0
  • P粉252116587

    P粉2521165872023-12-20 12:14:06

    operating hours:

    • Start XAMPP Control Panel

    • Click the Explorer button (this will XAMPP folder)

    • Navigate to apache > conf > Extra

    • and edited httpd.conf

    • I looked for the line "Listen 80" and made changes Change to "Listen to 81"

    • Also looked for the line "ServerName localhost:80", Change it to "servername localhost:81"

    • Restart Apache via XAMPP control (stop then start) panel

    Thank you Ken Lee for your helpful answer

    reply
    0
  • Cancelreply