[Cialug] CentOS httpd

Barry Von Ahsen vonahsen at gmail.com
Tue Nov 8 12:10:23 CST 2016


1000 times this, it's "new" and scary, but the wins are huge

I had great luck from here

https://wiki.centos.org/HowTos/SELinux <https://wiki.centos.org/HowTos/SELinux>


the mental leap that helped me was that SELinux lives in the kernel and works below the fs level, that's why the common issue is "file not found" - SELinux stops it from even being shown to the fs



-barry


> On Nov 8, 2016, at 11:45 AM, Kyle Hamilton <khamil8686 at gmail.com> wrote:
> 
> Check if selinux is enabled with 'getenforce'. You can search for 'fail' by using 'less /var/log/audit/auth.log' fressing 'G' to go the the end of the file, pressing '?' to do a reverse search, typing fail, hitting enter to finally search. Use n to go to next result, and N to go to previous search result. Selinux is most likely your problem.
> 
> Do not set selinux to permissive, just go over the small learning hump to learn it instead IMO since selinux is great for security. Make sure it has the correct selinux type with 'ls -Z' to show selinux info. Use chcon -t to change selinux type if needed to match the other files around it that are successfully used.
> 
> Hope this helps!
> 
> Kyle
> 
> 
> On 11/08/2016 11:37 AM, L. V. Lammert wrote:
>> Have a new GC CentOS 7 instance, .. installed httpd & enabled. For some
>> reason, however, the service cannot access the httpd.conf file:
>> 
>> Nov 08 17:28:27 webserver-1 systemd[1]: Starting The Apache HTTP Server...
>> Nov 08 17:28:27 webserver-1 httpd[16645]: httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: Permission denied
>> 
>> OK, the file is there:
>> 
>> root at webserver-1:~
>> # ll /etc/httpd/conf/httpd.conf
>> -rw-r--r--. 1 root root 25268 Oct 28 22:15 /etc/httpd/conf/httpd.conf
>> 
>> Directory ownership and permissions are the same on a working CentOS 5
>> machine:
>> 
>> $ ll /etc/httpd/conf/httpd.conf
>> -rw-r--r-- 1 root root 32209 Jun 11  2010 /etc/httpd/conf/httpd.conf
>> 
>> Is the extra "." after the permissions an issue (can't find any reference
>> for it, or is possibly something else?
>> 
>> 	TIA!
>> 
>> 	Lee
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug



More information about the Cialug mailing list