Search code examples
linuxweb-applicationswebserver

Unable to read a file from localhost


I have created a text file and stored in /var/www/html folder in my local linux machine. When I am trying to access the same file through URL- http://localhost/fileName, page is not loading. I was expecting that the file text should appear in browser.


Solution

  • What webserver are you running? If you're not using something like nginx or apache, or even python -m SimpleHttpServer, you're not going to be able to access it via the HTTP protocol.