简体   繁体   中英

404 Live Server Error on Visual Studio Code

I installed Live Server extension by Ritwick Dey on VS Code, but when I load it live. it shows the following error:

Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404 127.0.0.1 Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.10

looks like it can't find the path, previously it was working fine. Please help me fix it. Thanks

edit: If I deactivate xampp this error shows, don't know if it has to do anything with it, but hope this helps:

Error: connect ECONNREFUSED 127.0.0.1:80 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)

I have met the same problem when I used the live sever to browse my index.html page, but I fixed that finally. It turns out that I have open one folder in the vscode, and I just pull the new index.html into the vscode and check it, but this index.html file is not in the folder that I just turn on in the vscode, so when I run the live server to preview the web page I got the 404Not Find warning, so I turn off the original folder and open the folder that the index.html file in it, I run it again and I successfully got the web page I wanted to see.

If you're using XAMPP server you should put your files inside htdocs folder, usually located to c:\\xampp\\htdocs . Server is running, the problem is it cannot found files because it's trying to access to the wrong folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM