|
nginx.conf如下,自己试着删除了最后那几行有关ssl https的代码无效:Q 大佬们帮忙看看应该怎么改?
worker_processes 4;
# error_log /tmp/kvmd-nginx.error.log;
error_log stderr;
include /usr/share/kvmd/extras/*/nginx.ctx-main.conf;
events {
worker_connections 1024;
use epoll;
multi_accept on;
}
http {
types_hash_max_size 4096;
server_names_hash_bucket_size 128;
access_log off;
include /etc/kvmd/nginx/mime-types.conf;
default_type application/octet-stream;
charset utf-8;
sendfile on;
tcp_nodelay on;
tcp_nopush on;
keepalive_timeout 10;
client_max_body_size 4k;
client_body_temp_path /tmp/kvmd-nginx.client_body_temp;
fastcgi_temp_path /tmp/kvmd-nginx.fastcgi_temp;
proxy_temp_path /tmp/kvmd-nginx.proxy_temp;
scgi_temp_path /tmp/kvmd-nginx.scgi_temp;
uwsgi_temp_path /tmp/kvmd-nginx.uwsgi_temp;
include /etc/kvmd/nginx/kvmd.ctx-http.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-http.conf;
server {
server_name localhost;
include /etc/kvmd/nginx/listen-http.conf;
include /etc/kvmd/nginx/redirect-to-https.conf;
}
server {
server_name localhost;
include /etc/kvmd/nginx/listen-https.conf;
include /etc/kvmd/nginx/ssl.conf;
include /etc/kvmd/nginx/kvmd.ctx-server.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-server.conf;
}
}
---------------------------------------已解决,感谢各位大佬热心帮助--------------------------------------------
以下是笔记,
server {
server_name localhost;
include /etc/kvmd/nginx/listen-http.conf;
#注释掉,添加以下两行 include /etc/kvmd/nginx/redirect-to-https.conf;
include /etc/kvmd/nginx/kvmd.ctx-server.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-server.conf;
}
server {
server_name localhost;
include /etc/kvmd/nginx/listen-https.conf;
include /etc/kvmd/nginx/ssl.conf;
include /etc/kvmd/nginx/kvmd.ctx-server.conf;
include /usr/share/kvmd/extras/*/nginx.ctx-server.conf;
}
重启nginx服务,问题解决:lol |
|