Question
set up an Apache server. and Enable individual user web site. At the end of the /etc/httpd/conf/httpd.conf file, add in the following lines: UserDir enabled
set up an Apache server. and Enable individual user web site.
At the end of the /etc/httpd/conf/httpd.conf file, add in the following lines:
UserDir enabled
UserDir public_html
and restart httpd:
systemctl restart httpd.service
Create a user with alice123;
Login to alice123 create the directory of public_html;
Under public_html, create your homepage file: index.html -- You may put a brief introduction of yourself in the file to show that it's your work;
Now, try to access your homepage file on Windows VM:
http://your_Apache_server_IP_address/~alice123
Links to an external site. Does that work? Probably not. You need to troubleshoot to make it work. Some hints are as follows:
a. Your user alice123 directory must be executable for all users, and you may do it this way:
chmod a+x /home/alice123
b. the public_html directory must be readable and executable by all users:
chmod a+rx /home/alice123/public_html
c. also make sure the index.html files is readable and executable by all users;
Try to access your homepage on Windows VM, does it work now? If it still doesn't work, you may examine the server access log file carefully (Yes, you're going to use this log file a lot for troubleshooting and server administrations), and the filename is /var/log/messages. Most likely you will find out that the issues are with SeLinux, which restricts services on the server. In that case, you will need to set it up so that the SeLinux allows access to user web sites, by running the following command:
setsebool -P httpd_enable_homedirs true
and restart the Apache service (httpd).
Now, if everything is correct, you should be able to access your alice123 homepage from your Windows VM. Of course, if it still doesn't work, it will be your time to research, discuss, and practice troubleshooting to make it work -- That's the time you will really learn.
Under public_html, you may create your web page files, with your homepage file as index.html.
Take a screenshot of the Windows VM showing that it successfully displaying homepage with the correct webserver URL, along with your alice123 and the Windows VM name at the top.
At the end of task 2, write a brief summary about what you have done and what you have learned.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started