Apache will not display index in web root, subfolders are fineTrace where apache is serving a page fromWhy is this server redirecting to another page?Apache web server intermittently serves 403: “Directory index forbidden by Options directive” and 304All my PHP files are prompting direct downloadcPanel & DirectoryIndex - server default page showing for domain rootHow to restore apache configuration?.htaccess password directory protection - blank page.htaccess redirect all extension to phpDeny access to root directory while allowing access to the DirectoryIndex for default pageRestrict access to apache document root but not for subdomains
Is it possible for people to live in the eye of a permanent hypercane?
Replace only 2nd, 3rd, nth...character and onwards
Incremental Ranges!
Why is Colorado so different politically from nearby states?
Regarding eBGP Multipath
How to connect an offset point symbol to its original position in QGIS?
The term for the person/group a political party aligns themselves with to appear concerned about the general public
What is the history of the check mark / tick mark?
Personalization conditions switching doesn`t work in Experience Editor (9.1.0, Initial Release)
Explain Ant-Man's "not it" scene from Avengers: Endgame
Do I include animal companions when calculating difficulty of an encounter?
How certain is a caster of when their spell will end?
Count down from 0 to 5 seconds and repeat
Why don't B747s start takeoffs with full throttle?
The ring of global sections of a regular scheme
Humans meet a distant alien species. How do they standardize? - Units of Measure
Why is the relationship between frequency and pitch exponential?
Convert camelCase and PascalCase to Title Case
What does it mean by "d-ism of Leibniz" and "dotage of Newton" in simple English?
What happened to all the nuclear material being smuggled after the fall of the USSR?
How do you build a story from a world?
Is it OK to bring delicacies from hometown as tokens of gratitude for an out-of-town interview?
How were concentration and extermination camp guards recruited?
Comma Code - Ch. 4 Automate the Boring Stuff
Apache will not display index in web root, subfolders are fine
Trace where apache is serving a page fromWhy is this server redirecting to another page?Apache web server intermittently serves 403: “Directory index forbidden by Options directive” and 304All my PHP files are prompting direct downloadcPanel & DirectoryIndex - server default page showing for domain rootHow to restore apache configuration?.htaccess password directory protection - blank page.htaccess redirect all extension to phpDeny access to root directory while allowing access to the DirectoryIndex for default pageRestrict access to apache document root but not for subdomains
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have an Apache 2.2.3 server running on CentOS 5.5. In the root of my web directory, there is an index.html file.
Going to something like, say, www.exampledomain.egg/index.html
works, but going to www.exampledomain.egg/
displays a completely blank page. I've double checked the DirectoryIndex
option and still, nothing.
It seems as if this only affects the root of the domain. If there is a subdirectory, like www.exampledomain.egg/iamafolder/
, that will display its own DirectoryIndex as normal.
Here's what I have in the .htaccess file:
DirectoryIndex index.html index.txt index.php
apache-2.2 directory directoryindex
add a comment |
I have an Apache 2.2.3 server running on CentOS 5.5. In the root of my web directory, there is an index.html file.
Going to something like, say, www.exampledomain.egg/index.html
works, but going to www.exampledomain.egg/
displays a completely blank page. I've double checked the DirectoryIndex
option and still, nothing.
It seems as if this only affects the root of the domain. If there is a subdirectory, like www.exampledomain.egg/iamafolder/
, that will display its own DirectoryIndex as normal.
Here's what I have in the .htaccess file:
DirectoryIndex index.html index.txt index.php
apache-2.2 directory directoryindex
add a comment |
I have an Apache 2.2.3 server running on CentOS 5.5. In the root of my web directory, there is an index.html file.
Going to something like, say, www.exampledomain.egg/index.html
works, but going to www.exampledomain.egg/
displays a completely blank page. I've double checked the DirectoryIndex
option and still, nothing.
It seems as if this only affects the root of the domain. If there is a subdirectory, like www.exampledomain.egg/iamafolder/
, that will display its own DirectoryIndex as normal.
Here's what I have in the .htaccess file:
DirectoryIndex index.html index.txt index.php
apache-2.2 directory directoryindex
I have an Apache 2.2.3 server running on CentOS 5.5. In the root of my web directory, there is an index.html file.
Going to something like, say, www.exampledomain.egg/index.html
works, but going to www.exampledomain.egg/
displays a completely blank page. I've double checked the DirectoryIndex
option and still, nothing.
It seems as if this only affects the root of the domain. If there is a subdirectory, like www.exampledomain.egg/iamafolder/
, that will display its own DirectoryIndex as normal.
Here's what I have in the .htaccess file:
DirectoryIndex index.html index.txt index.php
apache-2.2 directory directoryindex
apache-2.2 directory directoryindex
edited May 18 at 22:31
window.document
1436
1436
asked Mar 22 '11 at 21:03
zach.hinchyzach.hinchy
1613
1613
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Check the apache access log file to see that you are indeed requesting the correct file. Also check the index file for any run-away tags (e.g. missing </head>
that could cause the whole document to be parsed as header information only.)
add a comment |
Are there other index.XXX files? Often index.php, for example will take priority over index.html.
no other index.* files.
– zach.hinchy
Mar 22 '11 at 21:08
Can you paste your DirectoryIndex line? Do you have another .htaccess in document root?
– farr
Mar 22 '11 at 21:10
No other .htaccess files. Here's the line: DirectoryIndex index.html index.txt index.php
– zach.hinchy
Mar 22 '11 at 21:12
You don't have mod_dir disabled by some config item or minimal installation do you? This is the module that provides the DirectoryIndex function
– farr
Mar 22 '11 at 21:13
no, because I can go to other subdirectories on my server and get the folder listing. actually, checking it out a bit more, it seems like the "blank index" thing is only happening in the web root. any subfolders are working as expected. i'm going to update my question to reflect that.
– zach.hinchy
Mar 22 '11 at 21:15
|
show 2 more comments
One thing you can try is checking to help troubleshoot is the last access time of the index.html file in question. First you'll need to make sure that atime flags are updated on your filesystem. Run mount and see if the filesystem that your document root is on has a noatime flag set. If it does, then you aren't updating the atimes of files and will need to remount it without this flag. Otherwise, it should be updating the atimes.
Now that you've done, that, just run this:
ls -l --full-time --time=atime index.html
Then wait a few seconds and then try to access http://www.exampledomain.egg/ then go back to the shell and run that ls command again and see if the atime has changed.
If the atime didn't change:
See if you still have the default welcome.conf turned on in /etc/httpd/conf.d/ It could be that the welcome error file is blank or something and you're matching that. The default match there only matches at the root, which sounds like what you are encountering.
If the atime did change:
Make sure the index.html file isn't really empty? cat index.html
Also, you didn't mention whether you checked the source in your browser on the blank page to see if it is really empty or if it just has invisible content.
Use a different browser to verify that the problem is on the server end:
curl http://www.exampledomain.egg/
And its ok if it really had invisible content, I've fooled myself a few times into thinking this so don't kick yourself too hard.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f250519%2fapache-will-not-display-index-in-web-root-subfolders-are-fine%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Check the apache access log file to see that you are indeed requesting the correct file. Also check the index file for any run-away tags (e.g. missing </head>
that could cause the whole document to be parsed as header information only.)
add a comment |
Check the apache access log file to see that you are indeed requesting the correct file. Also check the index file for any run-away tags (e.g. missing </head>
that could cause the whole document to be parsed as header information only.)
add a comment |
Check the apache access log file to see that you are indeed requesting the correct file. Also check the index file for any run-away tags (e.g. missing </head>
that could cause the whole document to be parsed as header information only.)
Check the apache access log file to see that you are indeed requesting the correct file. Also check the index file for any run-away tags (e.g. missing </head>
that could cause the whole document to be parsed as header information only.)
answered Mar 22 '11 at 21:35
jhojho
1315
1315
add a comment |
add a comment |
Are there other index.XXX files? Often index.php, for example will take priority over index.html.
no other index.* files.
– zach.hinchy
Mar 22 '11 at 21:08
Can you paste your DirectoryIndex line? Do you have another .htaccess in document root?
– farr
Mar 22 '11 at 21:10
No other .htaccess files. Here's the line: DirectoryIndex index.html index.txt index.php
– zach.hinchy
Mar 22 '11 at 21:12
You don't have mod_dir disabled by some config item or minimal installation do you? This is the module that provides the DirectoryIndex function
– farr
Mar 22 '11 at 21:13
no, because I can go to other subdirectories on my server and get the folder listing. actually, checking it out a bit more, it seems like the "blank index" thing is only happening in the web root. any subfolders are working as expected. i'm going to update my question to reflect that.
– zach.hinchy
Mar 22 '11 at 21:15
|
show 2 more comments
Are there other index.XXX files? Often index.php, for example will take priority over index.html.
no other index.* files.
– zach.hinchy
Mar 22 '11 at 21:08
Can you paste your DirectoryIndex line? Do you have another .htaccess in document root?
– farr
Mar 22 '11 at 21:10
No other .htaccess files. Here's the line: DirectoryIndex index.html index.txt index.php
– zach.hinchy
Mar 22 '11 at 21:12
You don't have mod_dir disabled by some config item or minimal installation do you? This is the module that provides the DirectoryIndex function
– farr
Mar 22 '11 at 21:13
no, because I can go to other subdirectories on my server and get the folder listing. actually, checking it out a bit more, it seems like the "blank index" thing is only happening in the web root. any subfolders are working as expected. i'm going to update my question to reflect that.
– zach.hinchy
Mar 22 '11 at 21:15
|
show 2 more comments
Are there other index.XXX files? Often index.php, for example will take priority over index.html.
Are there other index.XXX files? Often index.php, for example will take priority over index.html.
answered Mar 22 '11 at 21:07
farrfarr
362
362
no other index.* files.
– zach.hinchy
Mar 22 '11 at 21:08
Can you paste your DirectoryIndex line? Do you have another .htaccess in document root?
– farr
Mar 22 '11 at 21:10
No other .htaccess files. Here's the line: DirectoryIndex index.html index.txt index.php
– zach.hinchy
Mar 22 '11 at 21:12
You don't have mod_dir disabled by some config item or minimal installation do you? This is the module that provides the DirectoryIndex function
– farr
Mar 22 '11 at 21:13
no, because I can go to other subdirectories on my server and get the folder listing. actually, checking it out a bit more, it seems like the "blank index" thing is only happening in the web root. any subfolders are working as expected. i'm going to update my question to reflect that.
– zach.hinchy
Mar 22 '11 at 21:15
|
show 2 more comments
no other index.* files.
– zach.hinchy
Mar 22 '11 at 21:08
Can you paste your DirectoryIndex line? Do you have another .htaccess in document root?
– farr
Mar 22 '11 at 21:10
No other .htaccess files. Here's the line: DirectoryIndex index.html index.txt index.php
– zach.hinchy
Mar 22 '11 at 21:12
You don't have mod_dir disabled by some config item or minimal installation do you? This is the module that provides the DirectoryIndex function
– farr
Mar 22 '11 at 21:13
no, because I can go to other subdirectories on my server and get the folder listing. actually, checking it out a bit more, it seems like the "blank index" thing is only happening in the web root. any subfolders are working as expected. i'm going to update my question to reflect that.
– zach.hinchy
Mar 22 '11 at 21:15
no other index.* files.
– zach.hinchy
Mar 22 '11 at 21:08
no other index.* files.
– zach.hinchy
Mar 22 '11 at 21:08
Can you paste your DirectoryIndex line? Do you have another .htaccess in document root?
– farr
Mar 22 '11 at 21:10
Can you paste your DirectoryIndex line? Do you have another .htaccess in document root?
– farr
Mar 22 '11 at 21:10
No other .htaccess files. Here's the line: DirectoryIndex index.html index.txt index.php
– zach.hinchy
Mar 22 '11 at 21:12
No other .htaccess files. Here's the line: DirectoryIndex index.html index.txt index.php
– zach.hinchy
Mar 22 '11 at 21:12
You don't have mod_dir disabled by some config item or minimal installation do you? This is the module that provides the DirectoryIndex function
– farr
Mar 22 '11 at 21:13
You don't have mod_dir disabled by some config item or minimal installation do you? This is the module that provides the DirectoryIndex function
– farr
Mar 22 '11 at 21:13
no, because I can go to other subdirectories on my server and get the folder listing. actually, checking it out a bit more, it seems like the "blank index" thing is only happening in the web root. any subfolders are working as expected. i'm going to update my question to reflect that.
– zach.hinchy
Mar 22 '11 at 21:15
no, because I can go to other subdirectories on my server and get the folder listing. actually, checking it out a bit more, it seems like the "blank index" thing is only happening in the web root. any subfolders are working as expected. i'm going to update my question to reflect that.
– zach.hinchy
Mar 22 '11 at 21:15
|
show 2 more comments
One thing you can try is checking to help troubleshoot is the last access time of the index.html file in question. First you'll need to make sure that atime flags are updated on your filesystem. Run mount and see if the filesystem that your document root is on has a noatime flag set. If it does, then you aren't updating the atimes of files and will need to remount it without this flag. Otherwise, it should be updating the atimes.
Now that you've done, that, just run this:
ls -l --full-time --time=atime index.html
Then wait a few seconds and then try to access http://www.exampledomain.egg/ then go back to the shell and run that ls command again and see if the atime has changed.
If the atime didn't change:
See if you still have the default welcome.conf turned on in /etc/httpd/conf.d/ It could be that the welcome error file is blank or something and you're matching that. The default match there only matches at the root, which sounds like what you are encountering.
If the atime did change:
Make sure the index.html file isn't really empty? cat index.html
Also, you didn't mention whether you checked the source in your browser on the blank page to see if it is really empty or if it just has invisible content.
Use a different browser to verify that the problem is on the server end:
curl http://www.exampledomain.egg/
And its ok if it really had invisible content, I've fooled myself a few times into thinking this so don't kick yourself too hard.
add a comment |
One thing you can try is checking to help troubleshoot is the last access time of the index.html file in question. First you'll need to make sure that atime flags are updated on your filesystem. Run mount and see if the filesystem that your document root is on has a noatime flag set. If it does, then you aren't updating the atimes of files and will need to remount it without this flag. Otherwise, it should be updating the atimes.
Now that you've done, that, just run this:
ls -l --full-time --time=atime index.html
Then wait a few seconds and then try to access http://www.exampledomain.egg/ then go back to the shell and run that ls command again and see if the atime has changed.
If the atime didn't change:
See if you still have the default welcome.conf turned on in /etc/httpd/conf.d/ It could be that the welcome error file is blank or something and you're matching that. The default match there only matches at the root, which sounds like what you are encountering.
If the atime did change:
Make sure the index.html file isn't really empty? cat index.html
Also, you didn't mention whether you checked the source in your browser on the blank page to see if it is really empty or if it just has invisible content.
Use a different browser to verify that the problem is on the server end:
curl http://www.exampledomain.egg/
And its ok if it really had invisible content, I've fooled myself a few times into thinking this so don't kick yourself too hard.
add a comment |
One thing you can try is checking to help troubleshoot is the last access time of the index.html file in question. First you'll need to make sure that atime flags are updated on your filesystem. Run mount and see if the filesystem that your document root is on has a noatime flag set. If it does, then you aren't updating the atimes of files and will need to remount it without this flag. Otherwise, it should be updating the atimes.
Now that you've done, that, just run this:
ls -l --full-time --time=atime index.html
Then wait a few seconds and then try to access http://www.exampledomain.egg/ then go back to the shell and run that ls command again and see if the atime has changed.
If the atime didn't change:
See if you still have the default welcome.conf turned on in /etc/httpd/conf.d/ It could be that the welcome error file is blank or something and you're matching that. The default match there only matches at the root, which sounds like what you are encountering.
If the atime did change:
Make sure the index.html file isn't really empty? cat index.html
Also, you didn't mention whether you checked the source in your browser on the blank page to see if it is really empty or if it just has invisible content.
Use a different browser to verify that the problem is on the server end:
curl http://www.exampledomain.egg/
And its ok if it really had invisible content, I've fooled myself a few times into thinking this so don't kick yourself too hard.
One thing you can try is checking to help troubleshoot is the last access time of the index.html file in question. First you'll need to make sure that atime flags are updated on your filesystem. Run mount and see if the filesystem that your document root is on has a noatime flag set. If it does, then you aren't updating the atimes of files and will need to remount it without this flag. Otherwise, it should be updating the atimes.
Now that you've done, that, just run this:
ls -l --full-time --time=atime index.html
Then wait a few seconds and then try to access http://www.exampledomain.egg/ then go back to the shell and run that ls command again and see if the atime has changed.
If the atime didn't change:
See if you still have the default welcome.conf turned on in /etc/httpd/conf.d/ It could be that the welcome error file is blank or something and you're matching that. The default match there only matches at the root, which sounds like what you are encountering.
If the atime did change:
Make sure the index.html file isn't really empty? cat index.html
Also, you didn't mention whether you checked the source in your browser on the blank page to see if it is really empty or if it just has invisible content.
Use a different browser to verify that the problem is on the server end:
curl http://www.exampledomain.egg/
And its ok if it really had invisible content, I've fooled myself a few times into thinking this so don't kick yourself too hard.
edited Mar 23 '11 at 0:50
answered Mar 23 '11 at 0:43
deltaraydeltaray
1,030713
1,030713
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f250519%2fapache-will-not-display-index-in-web-root-subfolders-are-fine%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown