Jump to content

Manually use index.html

Fredrikmikael

Hello i uploaded a simple test (index.html)

but the server doesnt use it, how do i manually make it use the index?

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

There should be a config option where you can set the default page the

server is supposed to load (so, in theory, you could set it to any page

name).

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

Any good webserver software, by that I mean Apache, will load an index file by default, beit .php, .html, .htm etc. Are you sure you've uploaded it to the right directory?

Link to comment
Share on other sites

Link to post
Share on other sites

Any good webserver software, by that I mean Apache, will load an index file by default, beit .php, .html, .htm etc. Are you sure you've uploaded it to the right directory?

Yup, I think for Apache it's public_html along with its subdirs.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

So ~/public_html is a users directory, ie. you should be accessing it from domain.com/~user/. Web root for machine running Apache is /var/www/. That's what you're doing right?

Link to comment
Share on other sites

Link to post
Share on other sites

So ~/public_html is a users directory, ie. you should be accessing it from domain.com/~user/. Web root for machine running Apache is /var/www/. That's what you're doing right?

Well, it's kinda difficult to tell since I don't have access to my web host's

complete directory structure. I have a symlink from www to public_html in my

home directory, that I can say for certain.

The contents of public_html are what gets displayed when you go to www.mydomain.com

(or rather, the index file for public_html gets displayed, in my case index.php).

Every directory or file which you want to access via www.mydomain.com/subdir/index.html

must be placed in that directory on the setup I have.

I'm definitely no expert on Apache, I'm primarily familiar with the setup I've

been working with for my website.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

Hello i uploaded a simple test (index.html)

but the server doesnt use it, how do i manually make it use the index?

If this is a server you are managing and you are sure you are using the right directory try looking in your apaches httpd.conf(Google it if you dunno where that is) and search for DirectoryIndex then add index.html to the end and restart apache(the list is space seperated).
Link to comment
Share on other sites

Link to post
Share on other sites

Well, it's kinda difficult to tell since I don't have access to my web host's

complete directory structure. I have a symlink from www to public_html in my

home directory, that I can say for certain.

The contents of public_html are what gets displayed when you go to www.mydomain.com

(or rather, the index file for public_html gets displayed, in my case index.php).

Every directory or file which you want to access via www.mydomain.com/subdir/index.html

must be placed in that directory on the setup I have.

I'm definitely no expert on Apache, I'm primarily familiar with the setup I've

been working with for my website.

 

Ah, your web host really only want you working from your home directory, hence the symlink. That public_html folder is more or less the /var/www/ folder on the machine. Infact, if it's a webhost service it's probably /var/www/domain.com/. Apache can serve different websites based on the get request on the same machine. If you were to send an http get request using the IP rather than the domain, you'll probably get some Apache default page.

Link to comment
Share on other sites

Link to post
Share on other sites

Cool, thanks for the info! :)

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×