1.nginx和php的重启命令
以下命令均为 dnf、apt、yum这些以软件包管理安装的php、nginx才会有的,源码安装除非配置了systemctl,否则下面的指令执行会报错,只能去源码安装的路径手动操作
nginx
启动服务:systemctl start nginx或nginx
强制关闭服务: pkill -9 nginx
重载配置:systemctl reload nginx
重启服务:systemctl restart nginx
开机启动服务:systemctl enable nginx
检查是否开机启动:systemctl is-enabled nginx
php
2.nginx和php、php-fpm的一些文件的位置
nginx的配置文件路径 /etc/nginx/nginx.conf
php安装路径/usr/local/lib/php
3.nginx的配置文件的一些解析
1.设置nginx的初始页面
首先进入nginx的设置文件 /etc/nginx/nginx.conf
cd /usr/local/nginx/conf
vi nginx.conf
listen 80;
location / {
index index.html;
root root/home;
}
在里面添加index xxx.html
即可完成设置xxx.html为初始界面
2.开启HTTP2
在listen
后面增加http2
即可