**一.开机启动** ~~~ vi /etc/rc.local /usr/local/nginx/sbin/nginx ~~~ **二.dns本地域名解析表:** ~~~ C:\Windows\System32\drivers\etc\hosts 192.168.2.1 bbs.linux.com 192.168.2.1 blog.linux.com 192.168.2.1 mysql.linux.com ~~~ **三.测试域名解析:** ~~~ ping bbs.linux.com ping blog.linux.com ping mysql.linux.com ~~~ **四.nginx配置虚拟主机:** ~~~ log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; server{ listen 80; server_name bbs.linux.com; access_log logs/bbs.access.log main; root html/bbs; } server{ listen 80; server_name blog.linux.com; access_log logs/blog.access.log main; root html/blog; } server{ listen 80; server_name mysql.linux.com; access_log logs/mysql.access.log main; root html/mysql; } ~~~ **五.tail和watch跟踪:** 1.文件跟踪 ~~~ tail -f file.txt ~~~ 2.命令跟踪 ~~~ watch -n 1 ls -l ~~~ ### **系统的学习PHP** 关注:PHP自学中心,回复相应的关键词,领取以下视频教程 **设计模式实例剖析与深入解读** 公众号里回复:20190714