Nginx and openssl: http://nginx.org/en/download.html
http://slproweb.com/products/Win32OpenSSL.html
Environment variable:
c:\ openssl-win64 \bin
th variable add %OPENSSL_HOME%
openssl genrsa -des3 -out xxx.key 1024
openssl req -new -key xxx.key -out xxx.csr
cp xxx.key xxx.key.org
openssl rsa -in xxx.key.org -out xxx.key
openssl x509 -req -days 365 -in xxx.csr -signkey xxx.key -out xxx.crt
Start nginx after modifying nginx.conf
server {
listen 443 ssl;
server_name localhost;
ssl_certificate C://nginx-1.18.0//ssl//xxx.crt;
ssl_certificate_key C://nginx-1.18.0//ssl//xxx.key;
#charset koi8-r;
#access_log logs/host.access.log main;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location /update {
alias C:/hy-8000;
allow all;
autoindex on;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Connection "";
proxy_http_version 1.1;
}
Read More:
- Nginx startup error: nginx: [error] open() “/ var / run / nginx/ nginx.pid The solution of “failed (2: no such file or directory)”
- nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
- Configure HTTPS and self signed certificate for nginx
- nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
- Ubuntu 20.04 builds nginx 1.18.0 and MAC file transfer / download to server
- nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
- /var/run/nginx/nginx.pid” failed (2: No such file or directory)
- Nginx error: nginx: [error] invalid PID number “” in “/run/nginx.pid”
- nginx: open() “/var/run/nginx.pid“ failed (2: No such file or directory)
- nginx: [error] open() “/usr/local/var/run/nginx.pid” failed (2: No such file or directory)
- CentOS7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument?
- nginx: [error] invalid PID number ““ in “/data/nginx/logs/nginx.pid“
- Design and implementation of music website based on Java
- nginx: [error] invalid PID number in /var/run/nginx.pid
- Installing xgboost in anaconda is based on win10 32 / 64 bit system
- nginx: [warn] conflicting server name “www.yqq.org“ on 0.0.0.0:80, ignored
- Expanding the file system based on XFS in LVM
- Nginx 502 Error: Failed to load resource: the server responded with a status of 502 (Bad Gateway)
- Nginx start error: job for nginx.service failed because the control process exited with error code
- Solve the problem of starting nginx nginx.pid error