Home  >  Article  >  Backend Development  >  How to modify the specified root directory of a domain name in php

How to modify the specified root directory of a domain name in php

coldplay.xixi
coldplay.xixiOriginal
2020-10-08 17:35:492499browse

php method to modify the specified root directory of the domain name: 1. Connect to xShell; 2. Enter the root path to find the nginx configuration file; 3. Modify the path, the code is [vi domain name configuration file, such as vi www .PHP.com.conf].

How to modify the specified root directory of a domain name in php

php method to modify the specified root directory of the domain name:

Step 1: Connect to xShell

Step 2: Enter the root path to find the nginx configuration file

cd .. 进入根目录
  cd usr    进入usr文件
  cd local 进入local文件
  cd nginx  进入nginx文件
  cd conf    进入conf文件
  cd vhost   进入vhost文件
  
  进入vhost文件之后 ll 显示里面的文件

How to modify the specified root directory of a domain name in php

Step 3: Modify the path

The vhost file displays the configuration file of your domain name. If you want to modify the address of which domain name, enter the following command

vi Domain name configuration File, such as vi www.PHP.com.conf

How to modify the specified root directory of a domain name in php

Just modify the root path inside to the path you want to specify

If you want to learn more about programming, please pay attention to the php training column!

The above is the detailed content of How to modify the specified root directory of a domain name in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn