Why can't I change the PHP web server configuration? I changed the root directory of the website to/wwwroot/www.
But it cannot be accessed.
Reply to discussion (solution)
What does access fail? What is written in the directory section?
What does access fail? What is written in the directory section?
Oh, forget to say, I'm using the centos7 system.
Inaccessible means
What is ServerRoot?
What is written in the directory section?
Yes.
What is ServerRoot?
It is ServerRoot "/etc/httpd"
ServerRoot "/etc/httpd"
Since the root of the server is in/etc/httpd
So how can I run/wwwroot/www?
Unless you set/wwwroot/www as a virtual directory, it cannot be a root
ALIAS www "/wwwroot/www"
Http: // localhost/www access
ServerRoot "/etc/httpd"
Since the root of the server is in/etc/httpd
So how can I run/wwwroot/www?
Unless you set/wwwroot/www as a virtual directory, it cannot be a root
ALIAS www "/wwwroot/www"
Http: // localhost/www access
My intention is to change the default website root directory ,,
Is the default httpd. in the conf file, I just changed a path. of course, the premise is that I have created the directory to be changed first. how do you set the virtual directory, in addition, do I have to set it to a virtual directory?
Can you just change ServerRoot?
You can simply use virtual host, and the root directory will not be changed.
The root directory must be the owner of the root directory. Otherwise, the root directory cannot be accessed.
Http://blog.csdn.net/fdipzone/article/details/8762507