Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th December 2008, 06:18 AM
billperrotta Offline
Registered User
 
Join Date: Nov 2008
Posts: 10
Question Not sure why my index2.php file is showing instead of my index.html file

When I hit site preview why does index2.php comes up. Why not index.html?
or when I view from outside. both files exist.
This is a vps and all the sites files are in httpdocs folder.
anyone have any ideas?

Help appreciated,
Bill
Reply With Quote
  #2  
Old 6th December 2008, 06:24 AM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Stab in the dark from someone who barely knows php (it has a lot ?'s right?) and is no expert on Apache, but...

However, in /etc/httpd/conf/httpd.conf there should be a line DirectoryIndex. See if by some chance, index.php is before index.html, in other words if it looks something like

DirectoryIndex index.php index.html

If that does turn out to be the solution, I'll be as surprised as anyone, but...

If it does look like that, reverse them so that index.html is first. (Or if anything else is before index.html, put index.html first.)
Reply With Quote
  #3  
Old 8th December 2008, 05:03 PM
billperrotta Offline
Registered User
 
Join Date: Nov 2008
Posts: 10
Question No that doesn't seem to be the answer

DirectoryIndex at_domains_index.html index.html index.html.var index.shtml index.
.cfm index.php index.htm

I tried both


DirectoryIndex at_domains_index.html index.html index.html.var index.shtml index.
.cfm index.htm index.php


DirectoryIndex index.html at_domains_index.html index.html.var index.shtml index.
.cfm index.php index.htm

Neither one makes the index.html file open instead of the index2.php file.

I also believe after that all I need to do is type Service httpd restart?

Anyone have any other ideas

Bill

Last edited by billperrotta; 8th December 2008 at 05:07 PM.
Reply With Quote
  #4  
Old 8th December 2008, 06:07 PM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Hang on a little longer, the forums are really busy these days with the new release. I'm sorry, but as I said, it was a stab in the dark.
Hopefully, someone will come to the rescue.
Reply With Quote
  #5  
Old 8th December 2008, 07:01 PM
neogranas Offline
Registered User
 
Join Date: Nov 2006
Location: U.S.A.
Age: 27
Posts: 473
Is your server set up so that all domains on it use /etc/httpd/conf/httpd.conf (or similar path) or does it use a conf file for each domain? I just want to clarify, as your original post seems to lead me to believe that you have httpd.conf and site1.conf in the same folder.

Do you have any .htaccess files that are overriding Apache?

Have you tried just:
Code:
DirectoryIndex index.html index.php
?
__________________
Registered linux user: #475337

Never underestimate someone with source code, a text editor, and the willingness to completely hose their system.
Reply With Quote
  #6  
Old 9th December 2008, 01:30 PM
billperrotta Offline
Registered User
 
Join Date: Nov 2008
Posts: 10
Question How do I figure out if .htaccess is overiding apache?

I put the httpd.conf file back in the original configuration
see below

DirectoryIndex at_domains_index.html index.html index.html.var index.shtml index.
.cfm index.php index.htm

What do you think I should try? I already tried the order in the two posts above.

Reply With Quote
  #7  
Old 9th December 2008, 01:58 PM
pete_1967 Online
Clueless in a Cuckooland
 
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,950
You have some other config that uses index2.php as index and that overwrites your 1st instance.

Have you used the GUI tool to configure/ try out settings, for your server. If you have, you'll be having 2 httpd.conf files (can't remember exact name for GUI version). Check that first. If there's just 1 httpd.conf, use cat/ less/ more to verify it is what it's supposed to be. If it is, grep for index2.php in your apache config dors (/etc/httpd if installed from Fedora package) and find out where index2.php is set.
__________________
A Drink is Not Just For Christmas - SaskyCom :thumb:


“Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime” so now go and...
RTFM FIRST: http://docs.fedoraproject.org/ & http://rute.2038bug.com/index.html.gz
Reply With Quote
  #8  
Old 9th December 2008, 02:20 PM
billperrotta Offline
Registered User
 
Join Date: Nov 2008
Posts: 10
Question Yes that is possible Cause we originally configured it with Plesk 8.2

Does anyone know the gui name of the second httpd.conf?
What is the grep command to search for index2.php?

Last edited by billperrotta; 9th December 2008 at 02:23 PM.
Reply With Quote
  #9  
Old 12th December 2008, 03:24 AM
JaredKaragen Offline
Registered User
 
Join Date: Dec 2008
Posts: 7
Quote:
Originally Posted by billperrotta View Post
Does anyone know the gui name of the second httpd.conf?
What is the grep command to search for index2.php?
I have been wondering this myself, as it seems the GUI does NOT use /etc/httpd/conf/httpd.conf, it seems to use some other file.
Reply With Quote
  #10  
Old 12th December 2008, 03:41 AM
scottro's Avatar
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
One quick way is to run updatedb

When that finishes (it will take a few minutes)

locate index2.php

This can sometimes be faster than the find command.
Reply With Quote
Reply

Tags
file, index2php, indexhtml, showing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Directoryindex now automatically showing index.html GeneralChaos Using Fedora 2 24th May 2006 04:47 AM
Moving a part of an HTML file to another file panpol Programming & Packaging 5 28th October 2005 09:03 AM
Desktop not showing file until i log in again TheSkunkMan Using Fedora 3 15th August 2005 05:57 AM


Current GMT-time: 23:34 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat