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: