问题
ngxin 443 配置完后,其它网站配置也能访问https但是提示证书不匹配的问题
命名一个默认443配置文件使其排在最前面,如 aaaxxx.conf,如果访问没有配置https的配置时会默认走最前配置过https的那个文件,所以把这个默认443配置文件放在第一个位置
server {
listen 443;
server_name _;
return 404;
ssl on;
ssl_certificate "/hlvan/cert/https/1_yqtbeta.hlvan.cn_bundle.crt";
ssl_certificate_key "/hlvan/cert/https/2_yqtbeta.hlvan.cn.key";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
}
解决 nginx: [alert] kill(17234, 1) failed (3: No such process)
[root@localhost/]# nginx -s reload
nginx: [alert] kill(189, 1) failed (3: No such process) 杀死189进程,可是并没有
[root@localhost /]# whereis ngnix
ngnix:[root@localhost/]#
[root@localhost /]# find / -name nginx
/usr/local/src/nginx/sbin/nginx
[root@localhost /]# find / -name nginx.conf
/usr/local/src/nginx/conf/nginx.conf
[root@localhost /]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
[root@localhost/]# nginx -s reload
安装完gitlab后 nginx无法关闭
安装gitlab, kill -9 nginx主进程号 nginx无法关闭,原因 gitlab-ctl 守护进程会启动的 nginx 要使用
gitlab-ctl stop nginx
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead
版本1.15及以后
listen 403 改为 listen 403 ssl
去掉 ssl on
nginx: [emerg] unknown directive "image_filter"
这是因为该模块没有被正确的加载。
目录下没有modules目录。
/usr/share/nginx/mod-http-image-filter.conf
load_module "/usr/lib64/nginx/modules/ngx_http_image_filter_module.so";
提供的文件内容在浏览器显示乱码
在http模块或者server模块中添加
charset utf-8;