99 lines
3.2 KiB
Plaintext
99 lines
3.2 KiB
Plaintext
##
|
|
# You should look at the following URL's in order to grasp a solid understanding
|
|
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
|
# https://www.nginx.com/resources/wiki/start/
|
|
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
|
|
# https://wiki.debian.org/Nginx/DirectoryStructure
|
|
#
|
|
# In most cases, administrators will remove this file from sites-enabled/ and
|
|
# leave it as reference inside of sites-available where it will continue to be
|
|
# updated by the nginx packaging team.
|
|
#
|
|
# This file will automatically load configuration files provided by other
|
|
# applications, such as Drupal or Wordpress. These applications will be made
|
|
# available underneath a path with that package name, such as /drupal8.
|
|
#
|
|
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
|
##
|
|
|
|
|
|
server {
|
|
#SSL 默认访问端口号为 443
|
|
listen 443 ssl;
|
|
|
|
#请填写绑定证书的域名
|
|
server_name dev.easyprompt8.com;
|
|
|
|
#请填写证书文件的相对路径或绝对路径
|
|
ssl_certificate ./crt/dev.easyprompt8.com_bundle.crt;
|
|
|
|
#请填写私钥文件的相对路径或绝对路径
|
|
ssl_certificate_key ./crt/dev.easyprompt8.com.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 /iap/callback {
|
|
rewrite ^/iap/callback /pub/iap/callback break;
|
|
proxy_pass http://localhost:8090;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location ~* ^/iap/((?!callback).*)$ {
|
|
proxy_pass http://localhost:8090;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# location /iap/ {
|
|
location ~* ^/(pub|grammar|user)/ {
|
|
proxy_pass http://localhost:8090;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
error_log /var/log/nginx/dev_aigrammar_error.log;
|
|
access_log /var/log/nginx/dev_aigrammar_access.log;
|
|
|
|
|
|
location / {
|
|
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
|
|
#例如,您的网站主页在 Nginx 服务器的 /etc/www 目录下,则请修改 root 后面的 html 为 /etc/www。
|
|
root /var/www/html;
|
|
index index.html index.htm index.nginx-debian.html;
|
|
}
|
|
}
|
|
|
|
|
|
# Virtual Host configuration for example.com
|
|
#
|
|
# You can move that to a different file under sites-available/ and symlink that
|
|
# to sites-enabled/ to enable it.
|
|
#
|
|
#server {
|
|
# listen 80;
|
|
# listen [::]:80;
|
|
#
|
|
# server_name example.com;
|
|
#
|
|
# root /var/www/example.com;
|
|
# index index.html;
|
|
#
|
|
# location / {
|
|
# try_files $uri $uri/ =404;
|
|
# }
|
|
#}
|