Apache home page about individual users and enforce access security system functions @ 2

Next we want to introduce the user to create a personal home page feature

1. First, we need to build a personal user useradd chengxuyuan password: gerenzhuye

 

 2. Turn on the individual user home page feature, vim to edit their files /etc/httpd/conf.d/userdir.conf

The UserDir disabled line with a # 17, representing the line is commented out, no longer works.
The sign in front of # UserDir public_html line 23 of the removal, said the bank is enabled.
Note: UserDir parameter indicates the name of the site you need to create a data directory in the user's home directory (ie public_html )

 

 

 

 Remember to save the modified quit and restart systenctl restart fttpd

 

3. Go to the next home directory chengxuyuan create yourself su - chengxuyuan

Built folder mkdir public _html 

And write the contents: echo "This is my first web"> public_html / index.html

Do not forget to modify the site and directory permissions: chomd -Rf 755 ./

 

 

 

 4. Enter the password to enter: Success!

 

 5. Next, we then look at password security authentication.

First, switch to the root directory, login password URL

htpasswd -c /etc/httpd/passwd chengxuyuan

 

 6. Turn on password authentication as well as some of the relevant configuration

vim /etc/httpd/conf.d/userdir.conf

 

 Modified as follows, keep in mind some important part of a letter can not be bad, I was wrong letter, looking for a long error, allowing the user may have multiple. There must be restarted after save and exit, or else be wrong!

 

 7. Enter the password into:

 

 

 

 Login successful! Well done!

 

 

@ About mandatory access security subsystem

Step 1: Switch to the SELinux profile directory services " / etc / SELinux ."

Step 2: Edit config file mode to Enforce, remember to save Oh!

If you find SELINUX = permissive or disabled then quickly turn over come:

[root@linuxprobe ~]# cd /etc/selinux

[root@linuxprobe selinux]# vim config

SELINUX=enforcing

At this point you can query the current service status SELinux:

[root@linuxprobe ~]# getenforce

Enforcing

 

Guess you like

Origin www.cnblogs.com/li2019/p/11781348.html