LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   creating index file (https://www.linuxquestions.org/questions/linux-newbie-8/creating-index-file-4175631735/)

CosmoAnderson 06-11-2018 04:53 PM

creating index file
 
I just got an hosting account, and uploaded my html.
It didn't load and was told I needed a index file. Can someone point me in the direction of how to create one?
Thanks, Cosmo

scasey 06-11-2018 05:00 PM

Have you configured the web server to deliver your html from the location to which you uploaded it?
What is the name of the file containing the "home" page of your site?

AwesomeMachine 06-11-2018 05:04 PM

Index.html is the default name for the home page.

scasey 06-11-2018 05:11 PM

Quote:

Originally Posted by AwesomeMachine (Post 5866318)
Index.html is the default name for the home page.

Um. Typically index.html or index.htm -- an out-of-the-box apache configuration, at least, wouldn't recognize the capital I. (Tho I concede your post may have suffered from some sort of autocorrect)
.
But it's not clear whether the OP has configured the web server at all, so they may be getting the server's default response page even if they have an index.html. Let's see what they say...

michaelk 06-11-2018 05:15 PM

Welcome to linuxquestions.

In addition, the default web page if not specified when you browse to a website is typically index.html. That file as stated needs to be saved in what is known as the server's document root directory.

If your file is in the correct dirrectory but not saved as index.html you can try entering www.your_server_url/file.name

I can't type fast...

CosmoAnderson 06-11-2018 05:20 PM

Success!
 
All I did was change the name of my file to home.html (I had tried index.html before, but that didn't work.)
Thx!

scasey 06-11-2018 05:58 PM

Quote:

Originally Posted by CosmoAnderson (Post 5866325)
All I did was change the name of my file to home.html (I had tried index.html before, but that didn't work.)
Thx!

Hmm? That sounds backwards. The name of your file should be index.html to load by default.
Are you using www.yourdomain.com/home.html as suggested by michaelk?

In any event...glad you got it working!


All times are GMT -5. The time now is 08:14 AM.