When Showing this type error in xampp localhost at running localhost using xampp server. Then First You will go to in file location as below

“C:\Windows\System32\drivers\etc” and open “hosts” file and check this below line
127.0.0.1 localhost
::1 localhost

After that open file location as below
“C:\xampp\apache\conf\extra” and open “httpd-vhosts.conf” and check below line
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
ServerAlias www.localhost.co
<Directory "c:/xampp/htdocs">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
if it code will be not available in this file the write this line as below

After update this file will be open your localhost as below

I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND