Web server configuration and management of Linux--Create user profile

Source: Internet
Author: User

In this experiment, Redhat linux9.0 is used to operate on a virtual machine, which has a fairly sophisticated visual interface, which makes it easier for users to accept and understand.

The first is the configuration of the virtual machine, this does not say, when we installed the system, open the terminal, enter the command "Rpm-q httpd", Because linux9.0 already has the Apache service installed, this window displays the installed version information, which indicates that the system has successfully installed the Apache service. The next step is to start the service, and here are a few commands:

The first command is to check the status of the service, turn it on or off, and the second is to start the Apache service, then restart and shut down the service. After starting the service, enter the address of the virtual machine in the Address input box of the browser to display the default homepage:

the master configuration file for the Apache server is httpd.conf, which is case-insensitive and consists primarily of a global environment configuration, a master server configuration, and a virtual host configuration. We have not much knowledge of this experiment, find this file, different systems may be located in the same directory, I am in/etc in the word directory, so in the terminal window input "vi/etc/httpd/conf/httpd.conf", with the VI editor to modify it, First enter the edit mode, enter ' I ' after entering the command mode, and then find <ifmodule mod_userdir.c><ifmodule> program segment, set the user profile directory, and then find <directory/ home/*/public_html><Directory> Program section, set the user's home page in the directory of access permissions, here you may be a bit ignorant, it doesn't matter, we will have these two settings in the back of the map, then a look will understand.

In an Apache server with an IP address of 192.168.1.2, set the profile space for Kingma users in the system. The user's home directory is/home/kingma, and the directory where the profile space resides is public_html. This user can be created casually, we just want to use it as a user's home directory. Then you need to modify the user's home directory access and create a directory that hosts the user's profile:


The next step is to create the default homepage for your profile, which is what you see when you go to the homepage:


Finally, set the value userdir of the <ifmodule mod_userdir.c> module in the httpd.conf file to public_html,<directory/home/*/public_html> The container's comment is removed, which is the access rights to the directory of the user's profile that we mentioned earlier:


Restart the httpd service, and then enter "Http://192.168.1.2/~kingma" in the Address entry box of the virtual machine browser to indicate the success of your profile settings:


Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.