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!

Editing http.conf and my.cnf - where are the correct files?

Discussion in 'EasyApache' started by Sunlander, May 7, 2018.

  1. Sunlander

    Sunlander Active Member

    Joined:
    May 7, 2018
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi,
    I am using a CRM system that requires specific configuration settings on the server. Yesterday I added some of the specificastions to the http.conf file located at:

    nano /etc/apache2/conf/httpd.conf

    Then I noticed when |I re-started the server all my changes disappeared. I later spotted the message at the foot of http.conf file saying this particular file should not be edited. It says we should use include files.

    My question is, where do I find the include file to add my changes?

    I need to add/change things like:

    Header: Referrer-Policy same-origin
    Header: X-Powered-By

    In addition I need to add these values:
    max_connections 151
    thread_cache_size 9
    key_buffer_size 8.00 MB
    query_cache_size 40 MB
    tmp_table_size 16 MB
    max_heap_table_size 16 MB

    I tried adding them to the following file (after google search it pointed me to that file):
    nano /etc/my.cnf
    But the changes don't take effect.

    Is someone able to tell me what the correct files are that I should be editing?

    Kind regards
     
  2. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    348
    Likes Received:
    23
    Trophy Points:
    168
    Location:
    Spokane, Washington
    cPanel Access Level:
    Root Administrator
    For httpd.conf you can try this this below in WHM
    • Home »
    • Service Configuration »
    • Apache Configuration »
    • Include Editor
    Then Select All Versions under Pre VirtualHost Include

    Enter what you need to put in and click on Update.

    For /etc/my.cnf file I do not mess with this. I run Joomla, Word Press and few others and had no issues with defauts.

    But in the Tweak Settings
    • Home »
    • Server Configuration »
    • Tweak Settings
    In the MySQL Tab I turned on everything including this below and allow cPanel to control it.

    Allow cPanel & WHM to determine the best value for your MySQL innodb_buffer_pool_size configuration? [?]
    cPanel & WHM will use your total number of tables to adjust the innodb_buffer_pool_size value during each MySQL restart.

    I hope this helps.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelLauren likes this.
  3. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,719
    Likes Received:
    185
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    vlee likes this.
  4. Sunlander

    Sunlander Active Member

    Joined:
    May 7, 2018
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi both,

    thank you so much for your help - that was exactly what I needed :)
     
    cPanelLauren likes this.
  5. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    348
    Likes Received:
    23
    Trophy Points:
    168
    Location:
    Spokane, Washington
    cPanel Access Level:
    Root Administrator
    I am glad to hear that has helped you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelLauren likes this.
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