在nginx配置站点的时候,需要在site-enable中建立 一个软连接指向 site-available 相应的文件。
软链接就相当于windows下的快捷方式,把源文件删了后,链接文件也无法使用了。
ln -s a b 中的 a 就是源文件,b是链接文件名
附:详细ln命令帮助:
# ln --help
Usage: ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
or: ln [OPTION]... TARGET (2nd form)
or: ln [OPTION]... TARGET... DIRECTORY (3rd form)
or: ln [OPTION]... -t DIRECTORY TARGET... (4th form)
In the 1st form, create a link to TARGET with the name LINK_NAME.
In the 2nd form, create a link to TARGET in the current directory.
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
Create hard links by default, symbolic links with --symbolic.
When creating hard links, each TARGET must exist.
Mandatory arguments to long options are mandatory for short options too.
--backup[=CONTROL]