Skip to content

Commit

Permalink
feat(nginx): Add support for IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
cogk committed Nov 14, 2024
1 parent 4ff4b8f commit db670f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions agent/templates/agent/nginx.conf.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ map $http_upgrade $connection_upgrade {

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ name }};

ssl_certificate {{ tls_directory }}/fullchain.pem;
Expand Down
4 changes: 4 additions & 0 deletions agent/templates/bench/nginx.conf.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ map $host $site_name_{{ bench_name_slug }} {
{% for site in sites + ( domains.keys() | list ) %}
server {
listen 443 http2 ssl;
listen [::]:443 http2 ssl;
server_name {{ site.name or site}};

ssl_certificate {{ nginx_directory }}/hosts/{{ site.host or site }}/fullchain.pem;
Expand Down Expand Up @@ -145,6 +146,7 @@ server {

server {
listen 80;
listen [::]:80;
server_name
{% for site in sites -%}
{{ site.name }}
Expand All @@ -164,6 +166,7 @@ server {
{% else %}
server {
listen 80;
listen [::]:80;

server_name
{% for site in sites -%}
Expand Down Expand Up @@ -270,6 +273,7 @@ server {
{% if code_server -%}
server {
listen 80;
listen [::]:80;
server_name {{ code_server.name }};

location / {
Expand Down
6 changes: 6 additions & 0 deletions agent/templates/proxy/nginx.conf.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ proxy_cache_path /tmp/cache keys_zone=proxy_cache_zone:10m loader_threshold=300

server {
listen 443 http2 ssl{% if ns.host.strip("*.") == domain %} default_server{% endif %};
listen [::]:443 http2 ssl{% if ns.host.strip("*.") == domain %} default_server{% endif %};
server_name {{ ns.host }};


Expand Down Expand Up @@ -200,6 +201,7 @@ server {

server {
listen 80;
listen [::]:80;
server_name _;

location ^~ /.well-known/acme-challenge/ {
Expand All @@ -213,13 +215,15 @@ server {

server {
listen 127.0.0.1:10090;
listen [::1]:10090;
location / {
return 307 https://{{ domain }}/dashboard/#/sites/new?domain=$host;
}
}

server {
listen 127.0.0.1:10091;
listen [::1]:10091;

root {{ error_pages_directory }};
error_page 503 /deactivated.html;
Expand All @@ -236,6 +240,7 @@ server {

server {
listen 127.0.0.1:10092;
listen [::1]:10092;

root {{ error_pages_directory }};
error_page 402 /suspended.html;
Expand All @@ -252,6 +257,7 @@ server {

server {
listen 127.0.0.1:10093;
listen [::1]:10093;

root {{ error_pages_directory }};
error_page 402 /suspended_saas.html;
Expand Down

0 comments on commit db670f4

Please sign in to comment.