Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Is it possible to turn on by default "Optimize Website" in cPanel?

Discussion in 'Workarounds and Optimization' started by luigidelgado, Aug 14, 2012.

  1. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    118
    Likes Received:
    5
    Trophy Points:
    68
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    I always turn it on. I even include some other MIME types (text/html text/plain text/xml text/css application/javascript application/x-javascript)

    Is there a way that I set this by default in cPanel when I create a new account?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,609
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    Have you tried copying the .htaccess file that it creates in /home/username location (not in public_html, as the mod_defalte entries will go into /home/username/.htaccess when you enable it in cPanel > Optimize Website) to the cPanel skeleton directory?

    Basically, copy one of the existing ones on an account to the skeleton directory:

    Code:
    cp /home/username/.htaccess /root/cpanel3-skel/
    chown root:root /root/cpanel3-skel/.htaccess
    On new account creation, that .htaccess will be copied to /home/username path and the ownership will be chowned to match that of the newly created account. This will also cause cPanel's Optimize Website to be detected as enabled for the account.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    118
    Likes Received:
    5
    Trophy Points:
    68
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Great!
    Im giving it a try. As soon as a new account is made I will check but seems to be working.
    Question: If I want to add files (for example a default landing page) can I place those files in cpanel3_skel/public_html/ ??
    or where?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,609
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Right, if you want a landing page for new accounts, simply place that page into /root/cpanel3_skel/public_html folder.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    118
    Likes Received:
    5
    Trophy Points:
    68
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Great! Thanks Ill give it a try.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice