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!

Apache Config instead of htaccess

Discussion in 'EasyApache' started by stapuff106, Oct 1, 2017.

  1. stapuff106

    stapuff106 Member

    Joined:
    Aug 4, 2017
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    Apache doc's state "You should avoid using .htaccess files completely if you have access to httpd main server config file."

    For a simple example I would like to add the following so I do not have to place it in my .htaccess file

    addDefaultCharset utf-8
    DefaultLanguage en-US

    In Home »Service Configuration »Apache Configuration »Include Editor I see:

    Pre Main Include
    Pre Virtual Host Include
    Post Virtual Host Include

    Which of the 3 do I edit for the example above that will effect all domains being hosted?
     
  2. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    189
    Likes Received:
    23
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    You can add it to the "Pre Main Include".
     
    stapuff106 likes this.
  3. stapuff106

    stapuff106 Member

    Joined:
    Aug 4, 2017
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chicago
    cPanel Access Level:
    Root Administrator
    I appreciate your response back.

    stapuff106
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,852
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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