Nginx
Linda L
这个作者很懒,什么都没留下…
展开
-
nginx: [error] open() “/run/nginx.pid“ failed (2: No such file or directory)
yum安装nginx后起不来 nginx安装完默认启动脚本在/usr/sbin 页面在/usr/share/nginx/html 执行 nginx -c /etc/nginx/nginx.conf nginx -s reload原创 2021-11-10 11:17:04 · 3856 阅读 · 0 评论 -
linux安装nginx
wget -c https://nginx.org/download/nginx-1.9.9.tar.gz 解压 #使用默认配置 ./configure #编译安装 make make install 编译安装到/usr/local/nginx 进入sbin目录 #重启nginx,建议先停止,再启动 ./nginx -s stop ./nginx #在rc.local增加启动代码即可 vi /etc/rc.local #增加一行 /usr/local/nginx/sbin/nginx,增加后保存 #设置执行原创 2021-04-16 12:40:53 · 159 阅读 · 0 评论 -
Nginx搭建静态文件服务器
比如在nginx安装目录的html下建了个静态文件,模拟本地静态资源 home.html<!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> <style> body { width: 35em; margin: 0 auto; font-family: Tahoma,原创 2017-10-28 18:38:44 · 1164 阅读 · 0 评论