dailidong commented on issue #808: [BUG] Swagger-ui can't access(swagger-ui不能访问)
URL: 
https://github.com/apache/incubator-dolphinscheduler/issues/808#issuecomment-532614473
 
 
   please see the nginx config and conf/application.properties, 
   Note the following configuration:
   for nginx:
   ` location /escheduler {
               proxy_pass http://127.0.0.1:12345; # 接口地址`
   for application.properties:
   `
   server.servlet.context-path=/escheduler/
   `
   then , the swagger api address: 
http://${ip}:8888/escheduler/doc.html?language=zh_CN&lang=cn
   
   
   the entire demo config like this: 
   `[root@220-165 escheduler_online]# cat /etc/nginx/conf.d/escheduler.conf 
   
           server {
               listen       8888;# port
               server_name  localhost;
               #charset koi8-r;
               #access_log  /var/log/nginx/host.access.log  main;
               location / {
               root   /opt/escheduler_online/dist;
               index  index.html index.html;
               }
               location /escheduler {
               proxy_pass http://127.0.0.1:12345; # 接口地址
               proxy_set_header Host $host;
               proxy_set_header X-Real-IP $remote_addr;
               proxy_set_header x_real_ipP $remote_addr;
               proxy_set_header remote_addr $remote_addr;
               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
               proxy_http_version 1.1;
               proxy_connect_timeout 300s;
               proxy_read_timeout 300s;
               proxy_send_timeout 300s;
               proxy_set_header Upgrade $http_upgrade;
               proxy_set_header Connection upgrade;
               }
               #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   /usr/share/nginx/html;
               }
           }
       `
   
   and 
   
   `[root@220-165 conf]# cat application.properties 
   # server.port=12345
   server.port=12345
   
   # session config
   server.servlet.session.timeout=7200
   
   server.servlet.context-path=/escheduler/
   
   # file size limit for upload
   spring.servlet.multipart.max-file-size=1024MB
   spring.servlet.multipart.max-request-size=1024MB
   
   #post content
   server.jetty.max-http-post-size=5000000
   
   spring.messages.encoding=UTF-8
   
   #i18n classpath folder , file prefix messages, if have many files, use "," 
seperator
   spring.messages.basename=i18n/messages`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to