Linux (21): Apache service configuration (ii)

Source: Internet
Author: User
Tags php language

1. Normal user access to home directory
?
? immediately before the progress, we think about the implementation of the blog, each user after login. are in their own home directory, then for our request is to set each user's default publishing directory for their home directory. And then we're going to implement it:
?
? (1) First to restore the previous operation:
?
?
?
(2) Create a user and set up a home directory and its default publishing file:
?
?
?
? Write the default publish content:
?
?
After setting up these steps, we open this parameter in the home directory in the configuration file:
?
?
?
? After setting up the configuration file, we also set the SELinux Boolean value:
?
?
?
The last line of content shows that we have allowed access to the home directory.
?
? After restarting we log in to test's home directory:

?
?
? hehe, we've seen it.
?

?
? 2. Support for display in other languages
?
? Sometimes we want Apache to be able to display language content other than HTML. At this point we need to install the Apache Management manual first:
?
?
?
After the installation is finished, we start the httpd service again:
?

?
? So we can access its Admin manual page:
?
?
?
? Let's start by looking at how to display the content of the CGI language:
?
? If we want to set up the CGI language, we need to add the following in the httpd configuration file:
?
?
?
? This is an example of the first CGI language we will be writing:
?
?
?
? Let us first modify the main configuration file for httpd httpd.conf:
?
?
?
? then jump to the/var/www/html directory:
?
?
?
? This is what the index.cgi wrote:
?
?
?
To increase the execution privileges of index.cgi:
?
?
?
After restarting the HTTPD service, view the contents of index.cgi:
?
?
?
? We have seen the contents of the index.cgi:
?
?
Summary
?
? Similar to the language of CGI, we can use the same way to display the contents of the PHP language, which is no longer mentioned. The next knot we will explain the situation when the encryption.
?
?
?
?
?

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.