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.

Panic - made change in cPanel setup - now .html files are trying d/l vs. open

Discussion in 'General Discussion' started by rwoody, Jan 8, 2011.

  1. rwoody

    rwoody Member

    Joined:
    Jul 26, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    I was working on a web page that I needed to add in a php script and was not being able to do so. I searched out possible solutions and found instructions to add .html in the Apache Handle as "server-parsed". After doing so I realize immediately ...bad idea.. now all .html pages on that site are trying to d/l vs. open when clicked. I immediately removed the setting (it was only there for moments as I immediately tested) and it won't revert back. Its my server, so I rebooted apache thinking that would flush things out and reset...nope... This is rearly a mess. can someone help?

    Ruth
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    In WHM > Apache Configuration > DirectoryIndex Priority whats at top of list?
     
  3. Indianets

    Indianets Well-Known Member

    Joined:
    Jun 13, 2008
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Run these -

    Code:
    /scripts/rebuildhttpdconf
    /scripts/restartsrv_apache
    This should fix the issues raised after editing httpd.conf unless you have distilled the changes.

    If you are using suPHP, add the following line to .htaccess (create it if does not exist, chown to the user and chmod to 644) top /home/USERNAME/public_html/

    Code:
    Options +ExecCGI
    AddHandler application/x-httpd-php .html
    AddHandler application/x-httpd-php5 .html
    
    Better not to play with main httpd.conf file and let cPanel manage that. If you want something to be included in httpd.conf use the individual user conf files instead which will keep the settings after a rebuild also.

    - Vijay
     
Loading...

Share This Page