Webserver configuration and management of Linux--Create user profile

Source: Internet
Author: User

In this experiment, Redhat linux9.0 is used to operate on the virtual machine, which already has a fairly good visual interface, so that users will be more easy 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", Since linux9.0 already has Apache service installed, this window will show the installed version number information, which indicates that the system has been installed successfully Apache service. The next step is to start the service, and here are a few commands to see:

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 and 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 main configuration file for Apacheserver is httpd.conf, which does not differentiate between uppercase and lowercase, and is primarily composed of a global environment configuration, a primary server configuration, and a virtual host configuration. We do not have much knowledge of this experiment, find this file, different systems may be located in the same folder, I am in/etc in the Word folder, so in the terminal form input "vi/etc/httpd/conf/httpd.conf", with the VI Editor to change 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 folder, and then find <directory/ home/*/public_html><Directory> Program section, set the user's personal home page in the folder of access permission, here you may be a bit ignorant, it's okay, we will have these two sets of figure in the back, It will be clear at the time.

In Apacheserver with IP address 192.168.1.2, set the profile space for Kingma users in the system. The user's home folder is/home/kingma, and the folder 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 folder. Then you need to change the user's home folder access permissions and create a folder to store the user's personal home page, see:


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


Finally, the contents of the <ifmodule mod_userdir.c> module in the httpd.conf file are set to Public_html,<directory/home/*/public_html> value Userdir The container's gaze is removed, which is the access permission to the folder of the user's profile that we mentioned earlier:


Start the httpd service again, and then enter "Http://192.168.1.2/~kingma" in the Address entry box of the virtual machine browser to display the results you see, stating that your profile is successful:


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.