user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
# include /etc/nginx/conf.d/*.conf;
# 证书未知一定要配置对
server{
listen 443 ssl;
server_name emos-api.lvnvl.cn;
default_type text/html;
ssl_certificate cart/emos-api.lvnvl.cn/emos.pem; #需要将cert-file-name.pem替换成已上传的证书文件的名称。
ssl_certificate_key cart/emos-api.lvnvl.cn/emos.key; #需要将cert-file-name.key替换成已上传的证书密钥文件的名称。
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
#表示使用的加密套件的类型。
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #表示使用的TLS协议的类型。
ssl_prefer_server_ciphers on;
location / {
root /usr/share/nginx/html/emos-api.lvovl.cn
index index.html
}
location /dev/ {
proxy_pass http://172.16.125.245:8022;
}
}
17,0-1 Top