[CentOS-docs] doc?: TipsAndTricks/ApacheVHostDir
Filipe Brandenburger
filbranden at gmail.com
Thu Sep 3 20:27:04 UTC 2009
Hi,
On Thu, Sep 3, 2009 at 15:13, Ed Heron<Ed at heron-ent.com> wrote:
>> [1] I am not sure what will happen after a full relabeling of the
>> system, since the new directory does not exist in the selinux database
>> (I mean /etc/selinux/targeted/contexts/files/file_contexts, part of
>> selinux-policy)
>
> I added a disclaimer. Does it cover it?
The right way to fix it is to use "semanage fcontext" (see "man
semanage") to make that change permanent even after a relabel.
I believe it should be something like:
# semanage fcontext -a -t httpd_config_t "/etc/httpd/vconf\.d(/.*)?"
After that, you can use "restorecon" instead of "chcon":
# restorecon -R /etc/httpd/vconf.d
I did not test those above, so if you want to add them to the Wiki
page you should test them before you do.
But I still agree that just using "conf.d" achieves exactly the same
results with a lot less work, so it would still be my advice...
Cheers,
Filipe
More information about the CentOS-docs
mailing list