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.

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:
    109
    Likes Received:
    2
    Trophy Points:
    16
    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?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    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!
     
  3. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    16
    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?
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    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.
     
  5. luigidelgado

    luigidelgado Well-Known Member

    Joined:
    Nov 6, 2010
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    16
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Twitter:
    Great! Thanks Ill give it a try.
     
Loading...
Similar Threads - possible turn default
  1. jameshh93
    Replies:
    1
    Views:
    104

Share This Page