hub2000

Active Member
Dec 18, 2017
32
5
8
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?
 

hub2000

Active Member
Dec 18, 2017
32
5
8
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>
 
Last edited by a moderator:

hub2000

Active Member
Dec 18, 2017
32
5
8
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."
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

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

  • Includes are the last directives in each virtual host. An include file's contents override any value that exists in the primary configuration file.
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.