Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If I use this code where docroot is my new root for subdomain

$ ls -la --context /var/www/html
drwxr-xr-x  root root system_u:object_r:httpd_sys_content_t .
$ chcon -R system_u:object_r:httpd_sys_content_t /new/docroot

Then what will happen to my base url which is in default html folder?

share|improve this question
Your question seems about Apache virtual hosting, yet you're getting/setting SELinux security contexts on your file system. So, I don't get it. And take a look at your accept rate. – gertvdijk Dec 5 '12 at 8:30
I know I keep being ignored because I'm a newbie, only week into learning this stuff first time ever. Good news is I work it all out by myself anyway by reading docs and other answered posts. Not to worry, I am getting there. – freja Dec 5 '12 at 11:00
Totally off topic this comment. Anyway -- if you would be ignored/downvoted it would be because of your accept rate and not taking advice by others in comments to you in many of your questions. – gertvdijk Dec 5 '12 at 11:06
ok that's fine. – freja Dec 5 '12 at 11:35
1  
@gertvdijk Downvoting a question because of the asker's accept rate is not acceptable. Downvoting a question because the question is a bad one (lack of research, incomprehensible, …) is fine. freja: that's several questions you've asked which are hard to answer because you do not provide enough information. We can't tell what you've done, what you're trying to achieve. Post the contents of configuration files. Copy-paste error messages. Copy-paste the commands that triggered these messages. Tell us what distribution you're running. Etc. – Gilles Dec 5 '12 at 23:15
show 5 more comments

2 Answers

Test it on a testsystem. apachectl -S may already show problems if the documentroot is not accessible afterwards.

share|improve this answer

Use chcon --refer XXX YYY to copy the SE attributes, there's no need to guess the default permission that should set on the DocumentRoot.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.