The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Upgrade to R18404 changes directoryindex

Discussion in 'General Discussion' started by mtindor, Dec 12, 2007.

Thread Status:
Not open for further replies.
  1. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Prior to Release 18404, the default directoryindex would read index.HTML _before_ index.HTM. Now, since updating to 18404, Apache is reading index.HTM _before_ index.HTML.

    Why the change? I have a ticket open already requesting a best-solution answer to globally changing this back so that index.htmL is pulled before index.htm.

    Mike
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    It was a fix for everyone's favorite program, FrontPage
     
  3. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    that's a pretty big change to pull.
    I've used htm vs html sometimes while testing new pages.

    The one I wanted live would be html. There might still be some old index.htm files that will now replace the current home page?

    Ouch. Imagine you were putting joke content up about the bossy wife of the boss. But you knew it would never get seen, since html had priority over htm.

    cPanel decides to change the priority order, and, uh, um, "I don't know how that got there boss, we must've been hacked"

    And all this to cater to a dead program called FrontPage?

    was that thought out?
     
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I was given two options:

    1. add the appropriate directoryindex directive to the .htaccess file of affected domains
    - not an option for me - have to have a global change back to .html first

    2. edit apache files, specifically:

    Code:
    cp /var/cpanel/templates/apache1/main.default 
    /var/cpanel/templates/apache1/main.local
    
    Edit the main.local file, from the following
    
    [% IF supported.mod_dir -%]
    DirectoryIndex [% main.directoryindex.item.directoryindex %]
    [% END -%]
    
    TO
    
    [% IF supported.mod_dir -%]
    DirectoryIndex index.html [% main.directoryindex.item.directoryindex %]
    [% END -%]
    
    Execute /scripts/rebuildhttpdconf && /scripts/restartsrv_httpd
    
    The problem with option #2 is that if Cpanel updates /var/cpanel/templates/apache1/main.default, I would have to know this in order to then repeat the above process again. Otherwise, I risk perpetually using a main.local that is outdated after future Cpanel updates.

    Mike
     
  5. maggy

    maggy Active Member

    Joined:
    Jun 9, 2004
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    If you don't want stuff being read by the public, don't put it on the internet. A user could easily misspell the file extension if they typed in the URL and end up with the same result.

    I agree that this change should have at least been better announced prior to its implementation. Also, what's the solution for the above post? It seems clear that a variable is being introduced in the brackets there; can't the variable that goes into the template be changed instead to make it permanent?
     
  6. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    Though my example is extreme, how many times have you gone into a clients account to check on a problem for them and you see a whole mess of old files never cleared out.

    I don't understand why the change. Even with FrontPage, it was simple to just make sure there was no html page.

    Actually, it was great that FrontPage used htm as it's home. It meant you could put a splashpage up with index.html, and have the person actively editing their site in FrontPage.

    I also wonder what the 'standard' or 'accepted practice' is. For years I have been used to html having priority over htm. From server to server, cpanel or not, it always seemed that way. So, this change seems a bit out of place, and even more so if it was to accommodate the 'standards challenged' FrontPage, from the great 'standards breaker' Microsoft.

    If my understanding of the issue is wrong, please let me know. Perhaps it was just with mtindor's setup?

    Brian
     
  7. budway

    budway Well-Known Member

    Joined:
    Apr 16, 2003
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    Yes I detail that over a ticket also.

    I had client who had "index.htm" than after installed "index.php" so the "index.php" would show up and if the "php" was removed the "htm" would show up.

    Had many sites who was completelly offline due to index.htm being loaded instead of index.php lucky I noticed this looking at my site.

    But hey THAT's one of the reason why I'm beginning to HATE cpanel.
     
  8. maggy

    maggy Active Member

    Joined:
    Jun 9, 2004
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Any answer on how to change the
    Code:
    main.directoryindex.item.directoryindex
    variable directly?
     
  9. kjg

    kjg Well-Known Member

    Joined:
    Mar 2, 2004
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Is this a joke?:confused:

    We have hundreds of accounts having old .htm files that they don't use.

    Now they will all be very confused.
     
  10. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Add this line to your pre main include from WHM :

    Code:
    DirectoryIndex index.html index.htm index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm
    Or SSH as root and type :

    Code:
    echo 'DirectoryIndex index.html index.htm index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm' >> /usr/local/apache/conf/includes/pre_main_global.conf
    /usr/local/cpanel/bin/build_apache_conf
    service httpd restart
    
    This way, your change won't get lost after a cpanel update or apache rebuilt :)
     
  11. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    Unless cPanel makes another change that conficts.

    I'm just curious why such a change would be thought to be 'no problem'.
    In essence, cpanel decided to change the HOMEPAGE of every site. Ok, that's an exaggeration, but it is an important change. I was about to upgrade when I had seen this thread, and I'll have to put it off until I can block off some time to troubleshoot in case of a messup.

    Any chance it will be corrected in next update, negating any changes we make now?
     
  12. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    yes, I've put off updating too.
     
  13. maggy

    maggy Active Member

    Joined:
    Jun 9, 2004
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    qfe :rolleyes:
     
  14. budway

    budway Well-Known Member

    Joined:
    Apr 16, 2003
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    This thread looks dead, a major site function change was included like it's nothing.

    cPanel have to build a Update newsletter to warn system admin about stuff like this.
    (We need a roll/swtich warnnings over time-frame due "Instant/30/60/90" days)

    This will help LOWER support tickets and trouble shoot for cpanel and will make us look better with our client.

    I'm a big cPanel supported and was part of the movement when Rackshack didn't use cPanel and only offered Ensim, don't take me wrong take as a comment from a CLIENT.

    Best of Luck!

    Thanks guys/gals!
     
    #14 budway, Dec 16, 2007
    Last edited: Dec 16, 2007
  15. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    No ETA, but we are working to make DirectoryIndex configurable, rather than attempting to have 'one true way'

    In fact, your feedback here is providing the impetus.
     
  16. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Good to hear that as I cannot upgrade until this is fixed. I use an index.htm as a under construction page and have .htm set to load LAST. If people use Frontpage then it's overwritten and if they don't then apache will pick the other extension to load first. So a huge number of my accounts have a index.htm "under contruction" page sitting there. They wouldn't be impressed with their sites showing "under construction" after an upgrade.
     
  17. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This Editor is now merged into Current and EDGE. Also, for those builds, the order of index.html and index.htm were reversed. Indeed, a lot of changes happened, which will be in the change log, once published.

    The DirectoryIndex editor should be in the next build of Release and Stable.

    Thanks for the feed back everyone.
     
  18. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    release

    Directory index is there, yeehaaa!

    But it doesn't save the current order between apache builds and it still places index.htm as first.
     
  19. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    There is an internal bug entry for this already, so QA is aware of this issue.

    I don't see a bugzilla entry for this, but given the existence of an internal bug entry, such an entry will not be required unless you wish to share further information.
     
  20. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Thanks for the heads-up on that.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page