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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    140
    Likes Received:
    14
    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:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page