Skip to main content

EA3 to EA4 - Permanent httpd.conf Changes

Comments

3 comments

  • cPanelMichael
    Hello, Instructions for using that same method with EasyApache 4 are referenced on this post: Apache log format issue with EasyApache 4 However, generally you should one of the methods documented at: Advanced Apache Configuration - EasyApache 4 - cPanel Documentation For changes within all Virtual Hosts, you'd follow the instructions at: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation Thank you.
    0
  • Jim_WHM
    Thanks for the links and hints Michael. I ended up adding these lines to the WHM httpd.conf include editor (WHM "Home "Service Configuration "Apache Configuration "Include Editor) in "Pre VirtualHost Include" for "All Versions" and it seemed to do the trick. AddHandler application/x-httpd-ea-php70 .aspx AddType application/x-httpd-ea-php70 .aspx If you can think of a reason this is a bad idea let me know. I also added a .htaccess file with the same commands for backup in case EasyApache messes something up down the line. It's real important my aspx files are processed as php and the code not just served up as text. One concern is if php is upgraded either automatically or i do it myself forgetting that it will break the AddType command then all my code will be served up as text until i fix the AddType command to use the new php handler.
    0
  • cPanelMichael
    One concern is if php is upgraded either automatically or i do it myself forgetting that it will break the AddType command then all my code will be served up as text until i fix the AddType command to use the new php handler.

    This is the primary concern you will face when adding that custom AddHandler entry. You may want to consider using the following UAPI function via the command line to quickly enable that custom Mime type for all accounts: UAPI Functions - Mime::add_mime - Software Development Kit - cPanel Documentation You could also setup a script that utilizes that UAPI function and then runs it automatically as a hook during account creation. Thank you.
    0

Please sign in to leave a comment.