linux in respect of such class XII science

linux in respect of such class XII science

US Apache
Nginx Russia
the ultimate challenge:
128M + Linux website
64M linux + website
32M linux + website
website error: 500 502 hardware resource overload
LAMP Linux the Apache MySQL PHP
LNMP Linux nginx PHP MySQL

Permanent disc mount
/ dev / cdrom / media / cdrom iso9660 defaults 0 0

Install httpd service that is apche service
site data storage path: / var / www / html
master configuration file: /etc/httpd/conf/httpd.conf
119 line path settings
configuration is complete restart the service

SElinux three modes:

enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.


getenforce view the current SElinux mode
setenforce 0 Close
setenforce 1 open

SElinux domain

SElinux security context
to change the directory permissions to 755 chmod -Rf 755.

ls -ldZ / var / www / html directory permissions to view

Let command selinux immediate effect
restorecon -rv / Home / wwwroot
-rv recursion

semanage fcontext -a -t httpd_sys_content_t /home/wwwroot
semanage fcontext -a -t httpd_sys_content_t /home/wwwroot/*

restorencon -Rv / home / wwwroot
immediate effect command

Personal user profile management

/ etc /httpd/conf.d/userdir.conf
default profile is not open, you need to open the UserDir disabled preceded #
#UserDir public_html remove the # Set website data stored in the user's home directory name
to modify home directory permissions 755
restart the httpd service
getsebool command to query and filter out all the http protocol security policies, find httpd_enable_homedirs changed ON
setsebool set up permanent -P

Study notes as follows:











Guess you like

Origin www.cnblogs.com/thlchina/p/10992016.html