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