Help - Search - Members - Calendar
Full Version: Empty Html Files
Linuxhelp > Support > Technical Support
I'm new to Linux (installed it just days ago) and I'm having a rather confusing problem, among others.

So I'm using my computer for web development, and set it up as a web server. The problem is that HTML files aren't visible (to a browser) under my cgi-bin directory. I can view them outside of that directory, and my CGI scripts in the directory work just fine. But whenever I try to access HTML under cgi-bin, I get an empty file in my browser. I even made a file that was visible in the public_html directory, but wouldn't load when copied under cgi-bin.

I'm sure it's probably something little I need to change, probably in a configuration file, but I haven't had any success with that yet. Any help would be appreciated.

Check to make sure the executable bit isn't set. Try "chmod a-x *.html *.htm" in the cgi-bin dir on a tty or in xterm or konsole or whatever terminal you use, and see if that will help.
No, executable bit isn't set. Good thought though.

I created a test.html file in my home directory, which I can access just fine. I copied it (permissions included) directly under cgi-bin, and then my browser says it's empty.

Could it be part of my Apache configuration or something?
The cgi-bin directory is generally only for executable files, you shouldn't be able to load any html files in it by default. Why dont you try putting the test html file in apaches documentroot dir?
Really? I've used other servers before and had html files under cgi-bin that would load. Perhaps that web server ran cgi files not by what directory they were in but by their extensions. I haven't tried that method, as I've read it's less secure. Plus, if it's really a standard/default that html files don't come up under cgi-bin, I would rather stick to the standard.

Thanks for the help guys, I appreciate it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.