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!

How to modify httpd.conf permanently?

Discussion in 'Workarounds and Optimization' started by hub2000, Dec 18, 2017.

  1. hub2000

    hub2000 Registered

    Joined:
    Dec 18, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    germany
    cPanel Access Level:
    Root Administrator
    Hello,

    how to modify httpd.conf permanently (in parts!) ?

    For each vhost i need to put in some additional two lines of constant code for my online store:

    eg:
    <VirtualHost xx.xxx.xx.xxx:445>
    ServerName xxxxx.de
    ......
    .....
    SetEnv MAGE_RUN_CODE "diy_deu"
    SetEnv MAGE_RUN_TYPE "store"

    ....
    .....
    ...
    </VirtualHost>

    The problem is that the httpd.conf gets permanently updated and overwritten - no option.

    I tried to put in the following code in the post virtual host include, did not work:

    <VirtualHost xx.xxx.xx.xxx:445>
    SetEnv MAGE_RUN_CODE "diy_deu"
    SetEnv MAGE_RUN_TYPE "store"

    </VirtualHost>

    How to manage it?
     
  2. hub2000

    hub2000 Registered

    Joined:
    Dec 18, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    germany
    cPanel Access Level:
    Root Administrator
    i cannot edit my post due to "Spam".
    I put in the Post Virtual Host Include the following:

    Servername x
    Serveralias y
    SetEnv MAGE_RUN_CODE "diy_deu"
    SetEnv MAGE_RUN_TYPE "store"
    </VirtualHost>
     
    #2 hub2000, Dec 18, 2017
    Last edited by a moderator: Dec 18, 2017
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. hub2000

    hub2000 Registered

    Joined:
    Dec 18, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    germany
    cPanel Access Level:
    Root Administrator
    Hello,
    thanks, it helped.
    It was not clear for me that the lines are included in the httpd.conf as an "add on" and do not replace the content.

    (Because of the explanation in the help file "An include file's contents override any value that exists in the primary configuration file.")
    Perhaps better:
    "The include file's entries override existing entry values if the same entry also exists in the primary configuration file."
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see that document helped. As far as the terminology, it notes the following:

    This is accurate. Could you provide a specific example of a scenario where a modification to this statement is applicable or better explains it's purpose?

    Thank you.
     
    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