Modify the default site path in RadHat linux

Source: Internet
Author: User

In RadHat linux, modify the default path environment of the site: Redhat linux 5.4; apache 2.4.4; php 5.5 first sets up the environment. If you do not set up the 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. the current access path of conf is the default configuration, that is: documentRoot "/usr/local/apache/htdocs" <Directory "/usr/local/apache/htdocs"> change the default site Directory to/www (it is in the same Directory as/usr ). directory) for httpd. modify the conf file as follows: DocumentRoot "/www" <Directory "/www"> Create test under/www. php. [Php] <? Php echo "DocumentRoot = www"; [php] phpinfo (); [php]?> Restart apache. Enter http: // localhost/test. php In the browser and press Enter. The results were unexpected and there was no text. After research, we found that the www file path access permission was incorrect. The solution is simple. You only need to modify the www access permission. Enter chmod 750/www in the vi editor and enter the access address again. OK.

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.