wayne-cheng commented on a change in pull request #4856:
URL: https://github.com/apache/apisix/pull/4856#discussion_r692623238



##########
File path: apisix/cli/ngx_tpl.lua
##########
@@ -459,11 +459,11 @@ http {
 
     server {
         {% for _, item in ipairs(node_listen) do %}
-        listen {* item.port *} default_server {% if enable_reuseport then %} 
reuseport {% end %} {% if item.enable_http2 then %} http2 {% end %};
-        {% end %}
-        {% if ssl.enable then %}
+        listen {* item.ip *}:{* item.port *} default_server {% if 
enable_reuseport then %} reuseport {% end %} {% if item.enable_http2 then %} 
http2 {% end %};
+        {% if item.allow_ssl and ssl.enable then %}

Review comment:
       It is better to modify the config `apisix.ssl.listen_port` ,like this:
   ```yaml
   apisix:
     ssl:
       listen_port:
       - ip: 127.0.0.1
          port: 9443
   ```
   The ssl config in the param `apisix.node_listen[]` could be confusing,for 
example:
   ```yaml
   apisix:
     node_listen:
       - ip: 127.0.0.2
         port: 9082
         enable_ssl: true
       - ip: 127.0.0.2
         port: 9083
         enable_ssl: false
   ```
   What do you think?  @spacewander 
   




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to