appserver.conf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. server {
  2. listen 80;
  3. server_name apptest.wildfirechat.cn;
  4. rewrite ^(.*)$ https://apptest.wildfirechat.cn permanent;
  5. location ~ / {
  6. index index.html index.php index.htm;
  7. }
  8. }
  9. server {
  10. listen 443 ssl;
  11. server_name apptest.wildfirechat.cn;
  12. root html;
  13. index index.html index.htm;
  14. client_max_body_size 30m; #文件最大大小
  15. ssl_certificate cert/app.pem;
  16. ssl_certificate_key cert/app.key;
  17. ssl_session_timeout 5m;
  18. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  19. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  20. ssl_prefer_server_ciphers on;
  21. ## 不需要添加 add_header Access-Control-Allow-Origin $http_origin; 等添加跨域相关 header 的配置,app-server 已经处理了跨域了,所有请求透传过去即可
  22. ##
  23. ## send request back to app server ##
  24. location / {
  25. # 扫码超时时间是 1 分钟,配置了大于一分钟
  26. proxy_read_timeout 100s;
  27. proxy_pass http://127.0.0.1:8888;
  28. }
  29. ## 如果需要通过 path 来分流的话,请参考下的配置,path后面的/和 8888 后面的/ 都不能省略,可参考这儿:https://www.jb51.net/article/244331.htm
  30. #location /app/ {
  31. # proxy_pass http://127.0.0.1:8888/;
  32. #}
  33. }