Why can't I change the php web server configuration like this?-php Tutorial

Source: Internet
Author: User
Tags php web server
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

Related Article

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.