瀏覽代碼

default_server

Bob Mottram 6 年之前
父節點
當前提交
795f216d2b
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      src/freedombone-utils-web

+ 3
- 3
src/freedombone-utils-web 查看文件

1155
 
1155
 
1156
     nginx_file=/etc/nginx/sites-available/$local_hostname
1156
     nginx_file=/etc/nginx/sites-available/$local_hostname
1157
     { echo 'server {';
1157
     { echo 'server {';
1158
-      echo '  listen 80;';
1159
-      echo '  listen [::]:80;';
1158
+      echo '  listen 80 default_server;';
1159
+      echo '  #listen [::]:80;';
1160
       echo "  server_name ${local_hostname};";
1160
       echo "  server_name ${local_hostname};";
1161
       echo "  root /var/www/${local_hostname}/htdocs;";
1161
       echo "  root /var/www/${local_hostname}/htdocs;";
1162
       echo '  index index.html;';
1162
       echo '  index index.html;';
1179
       echo '}';
1179
       echo '}';
1180
       echo '';
1180
       echo '';
1181
       echo 'server {';
1181
       echo 'server {';
1182
-      echo '  listen 443 ssl;';
1182
+      echo '  listen 443 default_server ssl;';
1183
       echo '  #listen [::]:443 ssl;';
1183
       echo '  #listen [::]:443 ssl;';
1184
       echo "  server_name ${local_hostname};";
1184
       echo "  server_name ${local_hostname};";
1185
       echo "  root /var/www/${local_hostname}/htdocs;";
1185
       echo "  root /var/www/${local_hostname}/htdocs;";