In Linux, Apache and wu-ftpd servers can be used to implement personal space services through some simple settings. Apache is a web server and FTP provides the Home Page upload function. this article takes RedHat 7.2 Linux as an example. Assume that Apache and wu-ftpd servers have been installed. The specific configuration method is as follows:
(1) When installing redhat7.2 Linux, select "server" or install the server software;
(2) modify the section about personal space settings in the/etc/httpd/CONF/httpd. conf file (// is described in detail later)
Userdir public_html // modify the default directory, which can be modified.
// Corresponds
#
# Control access to userdir directories. The following is an example
# For a site where these directories are restricted to read-only.
#
#//
# AllowOverride fileinfo authconfig limit
# Options Multiviews indexes symlinksifownermatch IncludesNOEXEC
#
# Order allow, deny
# Allow from all
#
#
# Order deny, allow
# Deny from all
#
#//..... Remove all # between rows to make the settings of personal homepage users take effect. in addition, "/home/*/public_html" in "is the setting of the storage location of the personal homepage service in Linux * represents the directory name generated by the user name.
Restart the HTTPd service: httpd stop/httpd start or httpd restart
(3) add an FTP user's shell so that it cannot use commands, and telnet and SSH services
Edit the/etc/shells file and add a line of "/dev/null" at the end of the file.
(4) add an ftpchroot family. In the reorganization, the user uses the home directory as the FTP root directory.
Groupadd ftpchroot
(5) When a user applies for a personal homepage space, the user name used should be the ftpchroot group user on Linux. The following operations take the test user as an example:
Create a user test; Password: Test
Usradd test-S/dev/null-G ftpchroot
Passwd Test
In this way, a test directory is automatically generated under the/home directory.
(6) Go to the test directory, create the publish directory public_html on the personal homepage, and set the permissions.
CD/home/test
Mkdir public_html
Chmod 711/home/test
Chmod 755/home/test/public_html
Hosts file.
Note: If the server system is fully installed, the php jsp dynamic web page and MySQL PostgreSQL database can be supported on the personal homepage.