Jump to content

HTML page on Startup


snowman4839

Recommended Posts

I'm pretty new to Apache considering I installed it last night but I was wondering how you would get the first page that you see to look like what ever you want. I tried to go into the httpd document and change the Document root to an HTML file but that didn't work and that was just about my only idea...

Link to comment
https://forums.phpfreaks.com/topic/116207-html-page-on-startup/
Share on other sites

Probably not the best Description, but if you change your DocumentRoot back to just the folder containing the HTML file you want to display, then change that file to index.html, it should load that page automatically whenever you go to your server.

 

There's a line called DirectoryIndex in the httpd.conf file which shows basically what files the Apache Server will look for by default if you don't give it a file.

 

For Example(Using Windows syntax just because):

 

If you have a file C:\website\index.html that you want to show up automatically you'd do this:

 

Set DocumentRoot to: C:\website\

 

Ensure DirectoryIndex has index.html in it.

 

And when you go to your server via web browser it should load up index.html by default.

Link to comment
https://forums.phpfreaks.com/topic/116207-html-page-on-startup/#findComment-597569
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.