Home > Article > Backend Development > 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: 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].
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 显示里面的文件
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
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!