How to provide personal homepage space services in RedHat7.2Linux
Source: Internet
Author: User
Article Title: how to provide personal homepage space services in RedHat7.2Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: sailor_lgj
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.
#//..... 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.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.