没有nginx命令(nginx没有configure如何编译)
nginx没有configure如何编译
1、安装编码源码的编译工具,一般是需要安装gcc yum install gcc
2、把源码解压 tar zxvf uname.tar.gz
3、进入解压的目录执行 ./configure make make install 完成编译安装
nginx没有sbin目录怎么重启
1.使用cd /usr/local/nginx/sbin命令进入nginx安装目录的sbin文件夹。
2. 输入启动命令
sbin文件里有个nginx文件,可使用./nginx的命令进行启动。
3. 启动成功
输入启动命令后,若没有出现任何报错信息,则启动成功。
nginx安装后没有nginx目录
LNMP相关软件安装目录 Nginx 目录: /usr/local/nginx/ MySQL 目录 : /usr/local/mysql/ MySQL数据库所在目录:/usr/local/mysql/var/ PHP目录 : /usr/local/php/
nginx没有pid
启动:cd /usr/local/nginx/sbin./nginxnginx服务启动后默认的进程号会放在/usr/local/nginx/logs/nginx.pid文件cat nginx.pid 查看进程号关闭:kill -TERM pid 快速停止服务kill -QUIT pid 平缓停止服务kill -9 pid 强制停止服务重启:cd /usr/local/nginx./nginx -HUP pid./nginx -s reload
nginx没有sbin
2.\Enter,反斜杠后面紧跟回车,表示下一行是当前行的续航。
./configure --sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-http_ssl_module \
--with-pcre=/usr/local/src/pcre-8.21 \
--with-zlib=/usr/local/src/zlib-1.2.8 \
--with-openssl=/usr/local/src/openssl-1.0.1c
nginx没有worker进程
nginx配置如下:
1、定义worker进程数:
worker_processes 10;
2、定义worker进程可同时服务请求数目:
worker_connections 1024;
3、禁止使用sendfile函数:
sendfile off;
4、开启空闲连接的文件检查:
linger_on_close on;
5、定义多个进程间通信存放文件路径及名称:
pid /var/run/nginx.pid;
6、定义用户和组:
user nobody nogroup;
7、定义worker进程数量:
worker_processes 10;
8、定义最大请求进程时间:
client_body_timeout 10;
9、定义服务的超时时间:
send_timeout 10;
10、打开目录列表功能:
autoindex on;
linux启动nginx没有文件目录
yum安装一般在 /usr/share/nginx/html/
源码安装一般在/usr/local/nginx/html8 19.8 18-19
nginx不编译直接使用
编译好的nginx可以直接使用,编译完后运行即可,也可以注册成服务后运行
nginx启动没有权限
检查index.html文件是不是有读的权限 nginx.conf里面的user定义的用户,只要它有读index.html的权限就OK了。
nginx找不到配置文件
nginx可以配置域名。
server {
listen 80; # 监听 80 端口
autoindex on;
server_name activate.navicat.com; //访问域名
access_log logs/host.access.log combined; //日志文件位置
index index.html index.htm index.jsp index.php; //前端页面显示优先级
if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
}
location / {
proxy_pass http://127.0.0.1:8080; # 反向代理到 8080 端口
add_header Access-Control-Allow-Origin *;
}
}
本网站文章仅供交流学习 ,不作为商用, 版权归属原作者,部分文章推送时未能及时与原作者取得联系,若来源标注错误或侵犯到您的权益烦请告知,我们将立即删除.