I'm trying to run a basic html file with live server extension, when I run it I get the Server is Started notification(as shown in the img below) but then nothing happens
even manually going to port 5500 like "http://127.0.0.1:5500/index.html" I get the following error
Cannot GET /index.html
i tried restarting vs code. uninstalling and reinstalling live server extension also tried uninstalling and reinstalling vs code. i set the default browser in the extension settings and on my computer any other ideas i can try would be appreciated
Thank you
I'm not sure why but changing file names (removed special characters) worked only if i do it manually it still doesn't load the browser automatically though..
This could be the issue I just solved.
VS code was not using the local IP as a host.
Manage > settings > search "use local" or "live server"> check "use local IP as host".
I hope that helps you or your connection needs could be unique and you might want to look at this guide. https://code.visualstudio.com/docs/setup/network
Related
My file name is index.html
I have tried running the command and manually entering http://127.0.0.1:5500/index.html into the browser this also does not work. I get a refused to connect message.
I have ensured I have a default browser set.
I have tried just about everything.
As soon as I select "Open with live server" VS Code starts processing the request, I navigate to settings.json where the extensions settings reside.
All I have in my settings.json is
"liveserver.settings.port": 5500
and in real time the file starts increasing the port number by 1 about every second. I have to physically close VS Code to stop it. "Stop live server" does not work.
I have tried uninstalling the extension, older versions, and even completely uninstalling VS Code.
NOTHING is working.
Please send help.
Try the steps from this question:
Live server installed but not working in VS code
This is a simple index.Html file, when i click on run i get the attached screen.
I have included the Json configuration.
The previous posts did not resolve my issue, and i did restart the machine as well as running VS Code as an admin. VS Code Error
installed Extensions
This happening because of your firewall setting restriction. please
Try Live Server Extension AND check for Firewall Settings.
Plain HTML/CSS can be opened as a file, no need to run them through a web server.
And if these procedures didn't work tell me about your browser.
I'm working on an app with a team. They are able to log in fine when running it on their local servers, however when I try to do so I get 'Invalide username / password' and no network activity or console errors in dev tools.
I have no idea why this could be, we're working on the exact same code - clearly it's something on my machine.
Has anyone come across anything like this before?
(Have tried other browsers and still nothing).
Maybe you need to check your server instalation on your machine.
For example, if you are using XAMPP to manage your Apache maybe there is some configuration that was set in the wrong way.
My advice is, save your code and re-install your server, pay attention to all configuration details and see if the problem is solved.
When I change a file in the directory, the change is not reflected on the web page shown when I access it through localhost, but it is shown when I access it directly by the file path on my system. Why?
I am on a Windows machine. My files are stored at C:\Program Files (x86)\Ampps\www\connor.dev . When I directly reference a file, by going to a link like this in the browser, file:///C:/Program%20Files%20(x86)/Ampps/www/connor.dev/index.php, the changes I made and saved in Sublime Text are shown. When I access it by going to localhost/connor.dev/, the changes are not shown. Even if I delete the file completely, it is still shown in localhost. This started happening recently on xampp, so I uninstalled it and used Ampps, and now the same thing is happening. If you need more info please ask.
Press Ctrl-F5 to hard refresh the page (to not use Browser's cache).
If you still see the previous pages or changes, then Apache has mod_cache caching them, or PHP has its opcode cache settings set to not refresh changes for X amount of time.
I'm using Bitnami and the way I fixed it was to go inside C:\Bitnami\wappstack-version-number\php\php.ini, you can make the following changes and then reset your server:
opcache.enable=0
opcache.revalidate_freq=0
My php was updating every 60 seconds before, so I decided to turn that to 0 and just disable caching.
Its happening because of apache mod_cache caching the resources.
For quick fix. Just restart the Apache server.
In ubuntu i use this below command in terminal to restart the Apache server
systemctl restart apache2
Now refresh the browser, then you will get the updated one.
It comes out to be an issue with the cache thing, so in simple words all you have to do is to remove the cached data of the specific webpage.
I just set up Aptana and have configured the Apache testing server in the folder C:\Apache\htdocs. When I try to test a simple HTML file I am directed to localhost/myproject/myfile.html but I get a 404 error. Upon inspecting the folder I find it empty. If I put a file in that folder the external server displays it just fine, but Aptana is not loading the files on the testing server when I attempt to run them. Any ideas? I know it's something simple, but I can't seem to figure out the problem.
Thanks,
Rob
The solution I discovered for this seems like a workaround but may be the only way to perform the task. I simply set up the localhost server just as if I was publishing the site to a remote location. Of course, the files don't update automatically when viewed like Dreamweaver does, but it works.
I discovered the best solution to this problem. I discovered I needed to install an FTP server on the local machine. I installed and configured Filezilla server and voila - problem solved. The only tip I'd add is to make sure to set the permissions properly for the folder or you'll run into errors.