You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Scott A. Wozny" <sa...@hotmail.com> on 2020/06/10 21:29:38 UTC
[users@httpd] How to permanently disable default config files
Running the Centos7 packaged httpd, I didn't want the config files in /etc/httpd/conf.d (autoindex.conf, userdir.conf and welcome.conf) to load. I thought I was being clever and renamed them all to name.disable so they there there for my reference, but wouldn't load the modules and settings.
Then I did a yum update to httpd. The disable files were still there, but the installer replaced the "missing" .conf file which kept my instance from loading (I have disabled modules necessary for some of the config lines in these conf files).
Is there a "standard" way to remove files so a yum update install doesn't replace them? I have "comment out all the lines in the conf files and leave them in place" as a fallback, but I was wondering if I'm missing the "correct" way to do this. I can't imagine I'm the only person who doesn't want those files to load on a default install.
Thanks for any suggestions you may have,
Scott
Re: [users@httpd] How to permanently disable default config files
Posted by "Scott A. Wozny" <sa...@hotmail.com>.
I'll check with the CentOS crew. Thanks very much. 🙂
Scott
________________________________
From: Frank <th...@apache.org>
Sent: June 11, 2020 6:54 PM
To: users@httpd.apache.org <us...@httpd.apache.org>
Subject: Re: [users@httpd] How to permanently disable default config files
On 10/06/20 05:29 PM, Scott A. Wozny wrote:
> Running the Centos7 packaged httpd, I didn't want the config files in
> /etc/httpd/conf.d (autoindex.conf, userdir.conf and welcome.conf) to
> load. I thought I was being clever and renamed them all to name.disable
> so they there there for my reference, but wouldn't load the modules and
> settings.
>
> Then I did a yum update to httpd. The disable files were still there,
> but the installer replaced the "missing" .conf file which kept my
> instance from loading (I have disabled modules necessary for some of the
> config lines in these conf files).
>
> Is there a "standard" way to remove files so a yum update install
> doesn't replace them? I have "comment out all the lines in the conf
> files and leave them in place" as a fallback, but I was wondering if I'm
> missing the "correct" way to do this. I can't imagine I'm the only
> person who doesn't want those files to load on a default install.
>
> Thanks for any suggestions you may have,
>
> Scott
That would be a question for the maintainers of that package, ideally.
Check the CentOS mailing list and/or IRC channel on freenode.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How to permanently disable default config files
Posted by Frank <th...@apache.org>.
On 10/06/20 05:29 PM, Scott A. Wozny wrote:
> Running the Centos7 packaged httpd, I didn't want the config files in
> /etc/httpd/conf.d (autoindex.conf, userdir.conf and welcome.conf) to
> load. I thought I was being clever and renamed them all to name.disable
> so they there there for my reference, but wouldn't load the modules and
> settings.
>
> Then I did a yum update to httpd. The disable files were still there,
> but the installer replaced the "missing" .conf file which kept my
> instance from loading (I have disabled modules necessary for some of the
> config lines in these conf files).
>
> Is there a "standard" way to remove files so a yum update install
> doesn't replace them? I have "comment out all the lines in the conf
> files and leave them in place" as a fallback, but I was wondering if I'm
> missing the "correct" way to do this. I can't imagine I'm the only
> person who doesn't want those files to load on a default install.
>
> Thanks for any suggestions you may have,
>
> Scott
That would be a question for the maintainers of that package, ideally.
Check the CentOS mailing list and/or IRC channel on freenode.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How to permanently disable default config files
Posted by "Scott A. Wozny" <sa...@hotmail.com>.
Interesting. I'd have to maintain a list of files I "disabled" but it may end up being worth it. Although, commenting or emptying the files when I'm initially building my template may be less effort in the long run. I'll have to think about it. Thanks for the feedback! 🙂
Scott
________________________________
From: Yehuda Katz <ye...@ymkatz.net>
Sent: June 11, 2020 7:31 PM
To: users@httpd.apache.org <us...@httpd.apache.org>
Subject: Re: [users@httpd] How to permanently disable default config files
You can use yum-plugin-post-transaction-actions to delete the files (not currently available in CentOS 8 though):
Create a file named /etc/yum/post-actions/httpd.action
With the content:
httpd*:update:rm -f /etc/httpd/conf.d/file_to_delete
You should also be able to leave the files empty instead of deleting them - yum should leave the modified files alone.
- Y
Sent from a device with a very small keyboard and hyperactive autocorrect.
On Wed, Jun 10, 2020, 5:29 PM Scott A. Wozny <sa...@hotmail.com>> wrote:
Running the Centos7 packaged httpd, I didn't want the config files in /etc/httpd/conf.d (autoindex.conf, userdir.conf and welcome.conf) to load. I thought I was being clever and renamed them all to name.disable so they there there for my reference, but wouldn't load the modules and settings.
Then I did a yum update to httpd. The disable files were still there, but the installer replaced the "missing" .conf file which kept my instance from loading (I have disabled modules necessary for some of the config lines in these conf files).
Is there a "standard" way to remove files so a yum update install doesn't replace them? I have "comment out all the lines in the conf files and leave them in place" as a fallback, but I was wondering if I'm missing the "correct" way to do this. I can't imagine I'm the only person who doesn't want those files to load on a default install.
Thanks for any suggestions you may have,
Scott
Re: [users@httpd] How to permanently disable default config files
Posted by Yehuda Katz <ye...@ymkatz.net>.
You can use yum-plugin-post-transaction-actions to delete the files (not
currently available in CentOS 8 though):
Create a file named /etc/yum/post-actions/httpd.action
With the content:
httpd*:update:rm -f /etc/httpd/conf.d/file_to_delete
You should also be able to leave the files empty instead of deleting them -
yum should leave the modified files alone.
- Y
Sent from a device with a very small keyboard and hyperactive autocorrect.
On Wed, Jun 10, 2020, 5:29 PM Scott A. Wozny <sa...@hotmail.com> wrote:
> Running the Centos7 packaged httpd, I didn't want the config files in
> /etc/httpd/conf.d (autoindex.conf, userdir.conf and welcome.conf) to load.
> I thought I was being clever and renamed them all to name.disable so they
> there there for my reference, but wouldn't load the modules and settings.
>
> Then I did a yum update to httpd. The disable files were still there, but
> the installer replaced the "missing" .conf file which kept my instance from
> loading (I have disabled modules necessary for some of the config lines in
> these conf files).
>
> Is there a "standard" way to remove files so a yum update install doesn't
> replace them? I have "comment out all the lines in the conf files and
> leave them in place" as a fallback, but I was wondering if I'm missing the
> "correct" way to do this. I can't imagine I'm the only person who doesn't
> want those files to load on a default install.
>
> Thanks for any suggestions you may have,
>
> Scott
>