Modify the default site path in RedHatLinux

Source: Internet
Author: User
I am currently working on linux development and have encountered some problems. I am writing this article to help people who have encountered the same problems as me. Environment: RedHatlinux5.4; apache2.4.4; php5.5 first build the environment. If you do not set up the environment, the default recommended path is/usr/local /.. this process is also quite tangled with beginners. Let's talk about my problems. Problem description: I tested http After configuring apache and php:

I am currently working on linux development and have encountered some problems. I am writing this article to help people who have encountered the same problems as me.

Environment: RedHat linux 5.4; apache 2.4.4; php 5.5

The first step is to build an environment. If you do not build an environment, your environment path is the default recommended path:/usr/local/.. this process is also quite tangled with beginners.

Let's talk about my problems.

Problem description: After configuring apache and php, I will test that http: // localhost/can be accessed normally.

View the apache configuration file apache/conf/httpd. conf.

The current access path is the default configuration, that is:

DocumentRoot "/usr/local/apache/htdocs"

Change the default site directory to/www (in the same directory as/usr)

Make the following changes to httpd. conf:

DocumentRoot "/www"

Create linuxidc. php under/www.

Echo "DocumentRoot = www ";
Phpinfo ();
?>

Restart apache. Enter http: // localhost/linuxidc. php In the browser and press Enter.

The result was unexpected and no text appeared.

After research, we found that the www file path access permission is incorrect.

The solution is simple. You only need to modify the www access permission.

In the vi Editor, enter chmod 750/www

Enter the access address again. The access address is displayed normally. OK.

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

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.