1824293 Members
4949 Online
109669 Solutions
New Discussion юеВ

selinux and Apache

 
SOLVED
Go to solution
Maaz
Valued Contributor

selinux and Apache

Dear Gurus

selinux is anabled(required).
I have to configure the DocumenetRoot other than /var/www/html say e.g. I have to set the DocumentRoot /web/sales.
What I have to do ?

Regards
Maaz
5 REPLIES 5
Sung Oh
Respected Contributor
Solution

Re: selinux and Apache

Hi Maaz,

Here is web link for Apache configuration. http://www.siliconvalleyccie.com/linux-hn/apachebasic.htm

Apache web link look under document root
http://httpd.apache.org/docs/1.3/mod/core.html

Edit /etc/apache/httpd.conf file.

Regards,
Sung
Steven E. Protter
Exalted Contributor

Re: selinux and Apache

Shalom Maaz,

One of the maddening issues with selinux. Is not compatible out of the box with most httpd configurations.

My response is usually to turn off selinux

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Maaz
Valued Contributor

Re: selinux and Apache

Thanks Dear Sung Oh for a very nice and quick help ;).
the first url u provided has the solution of my question.

Regards
Maaz
Steven E. Protter
Exalted Contributor

Re: selinux and Apache

You are going to have to alter the selinux configuration to make apache work at that location.

You set the document root in httpd.conf and then selinux will prevent the web server from starting up at that location.

Then you will be left with two alternatives.

1) Change the selinux configuration to disabled.
2) Alter the selinux config to permit httpd to run in a location otehr than /var/www/html

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TANHM
Advisor

Re: selinux and Apache

Hi Maaz,

I think u can either disable the selinux (it will cause a lot of problem later on with other applications) or u can set it as permissive. If
your concerned is on system security...U can install firestarter after disable the selinux.

Thanks & Best Regards
HM