【Nginx】基本使用

cd E:/env/nginx-1.16.0

测试配置文件
nginx -t -c E:/env/nginx-1.16.0/conf/nginx.conf

启动
nginx -c E:/env/nginx-1.16.0/conf/nginx.conf

tasklist /fi "imagename eq nginx.exe"
taskkill /f /t /im nginx.exe

快速停止
nginx -s stop

完整有序的停止
nginx -s quit

重新加载生效
nginx -s reload

重新打开日志文件
nginx -s reopen



修改配置文件
指定端口9090

启动后访问路径:http://localhost:9090/



/etc/nginx/logs/access.log

允许iframe跨域

add_header X-Frame-Options 'ALLOW-FROM http://www.xxx.com';

 

posted @ 2022-06-15 15:18  翠微  阅读(49)  评论(0编辑  收藏  举报