Skip to content

Commit

Permalink
ci(nginx): remove annotation in nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
young committed Jul 24, 2024
1 parent 17ec96e commit a4f7663
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,63 +1,25 @@
#nginx进程数,通常设置成和cpu的数量相等
worker_processes auto;
#参考事件模型
events {
#单个进程最大连接数(最大连接数=连接数+进程数)
worker_connections 1024;
}
#设定http服务器
http {
#文件扩展名与文件类型映射表
include mime.types;
#默认文件类型
default_type application/octet-stream;
#虚拟主机的配置
server {
#监听端口
listen 80;
#域名可以有多个,用空格隔开
server_name promonkeyli.top;
# http => https;
return 301 https://$host$request_uri;

#定义本虚拟主机的访问日志
#access_log /admin-fe-access.log main; # 注意,在 Dockerfile 中创建 /admin-fe-access.log

#入口文件的设置
# location / {
# root /usr/share/nginx/html; #入口文件的所在目录
# index index.html index.htm; #默认入口文件名称
# try_files $uri $uri.html $uri/ =404;
# }
# error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# root html;
# }

}

# https 配置
server {
#SSL 默认访问端口号为 443
listen 443 ssl;
#请填写绑定证书的域名
server_name promonkeyli.top;
#请填写证书文件的相对路径或绝对路径
ssl_certificate /etc/nginx/certs/promonkeyli.top_bundle.crt;
#请填写私钥文件的相对路径或绝对路径
ssl_certificate_key /etc/nginx/certs/promonkeyli.top.key;
ssl_session_timeout 5m;
#请按照以下协议配置
ssl_protocols TLSv1.2 TLSv1.3;
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
#例如,您的网站主页在 Nginx 服务器的 /etc/www 目录下,则请修改 root 后面的 html 为 /etc/www。
root /usr/share/nginx/html; #入口文件的所在目录
index index.html index.htm; #默认入口文件名称
try_files $uri $uri.html $uri/ =404;
Expand Down

0 comments on commit a4f7663

Please sign in to comment.