@@ -580,6 +580,7 @@ for /l %%a in (1,1,%$totalConfigDomains%) do (
580
580
set $config[name] = !$config[%%a ][name]!
581
581
set $config[hostname] = !$config[%%a ][hostname]!
582
582
set $config[documentRoot] = !$config[%%a ][documentRoot]!
583
+ set $config[http2] = !$config[%%a ][http2]!
583
584
584
585
rem Show domain name.
585
586
call :logToBoth " ---------------------------------------------"
@@ -637,11 +638,19 @@ for /l %%a in (1,1,%$totalConfigDomains%) do (
637
638
rem (Re)Create HTTPS vhost file
638
639
rem -----------------------------
639
640
if not exist " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf" (
640
- (call :apache24HttpsVhostConfigFile) >> " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf"
641
+ if /i " !$config[http2]! " equ " false" (
642
+ (call :apache24Https11VhostConfigFile) >> " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf"
643
+ ) else (
644
+ (call :apache24Https2VhostConfigFile) >> " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf"
645
+ )
641
646
call :logToBoth " Created Virtual Host https file."
642
647
) else (
643
648
call :deleteFileIfExists " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf"
644
- (call :apache24HttpsVhostConfigFile) >> " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf"
649
+ if /i " !$config[http2]! " equ " false" (
650
+ (call :apache24Https11VhostConfigFile) >> " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf"
651
+ ) else (
652
+ (call :apache24Https2VhostConfigFile) >> " !$config[wampServerExtensionsPath]! \vhosts\https\!$config[hostname]! .conf"
653
+ )
645
654
call :logToBoth " Re-created Virtual Host https file."
646
655
)
647
656
@@ -777,11 +786,15 @@ for /l %%a in (1,1,%$totalApacheVersionsInstalled%) do (
777
786
call :logToBoth " 'ssl_module' already uncommented."
778
787
)
779
788
789
+
780
790
rem -----------------------------------------
781
791
rem Uncomment 'http2_module' module
782
792
rem
783
793
rem This module enables HTTP/2 support.
784
794
rem
795
+ rem HTTP/2 functionality set per development
796
+ rem domain.
797
+ rem
785
798
rem OpenSSL version must be greater than or
786
799
rem equal to 1.0.2 for HTTP/2 compatibility.
787
800
rem
@@ -1296,10 +1309,10 @@ echo ^</VirtualHost^>
1296
1309
exit /B
1297
1310
1298
1311
1299
- rem -----------------------------------------------------------
1300
- rem The vhosts 'httpd-ssl.conf' configuration (template) file
1301
- rem -----------------------------------------------------------
1302
- :apache24HttpsVhostConfigFile
1312
+ rem ---------------------------------------------------------------------------
1313
+ rem The vhosts 'httpd-ssl.conf' configuration (template) file (with HTTP/1.1)
1314
+ rem ---------------------------------------------------------------------------
1315
+ :apache24Https11VhostConfigFile
1303
1316
1304
1317
echo # Virtual Host - https://!$config[hostname]!
1305
1318
echo #
@@ -1337,6 +1350,50 @@ echo ^</VirtualHost^>
1337
1350
exit /B
1338
1351
1339
1352
1353
+ rem -------------------------------------------------------------------------
1354
+ rem The vhosts 'httpd-ssl.conf' configuration (template) file (with HTTP/2)
1355
+ rem -------------------------------------------------------------------------
1356
+ :apache24Https2VhostConfigFile
1357
+
1358
+ echo # Virtual Host - https://!$config[hostname]!
1359
+ echo #
1360
+ echo ^ < VirtualHost *:443^ >
1361
+ echo :
1362
+ echo ServerName !$config[hostname]!
1363
+ echo ServerAlias !$config[hostname]!
1364
+ echo ServerAdmin admin@%!$config[hostname]!
1365
+ echo DocumentRoot " !$config[documentRoot]! "
1366
+ echo :
1367
+ echo ^ < Directory " !$config[documentRoot]! /" ^ >
1368
+ echo SSLOptions +StdEnvVars
1369
+ echo Options +Indexes +Includes +FollowSymLinks +MultiViews
1370
+ echo AllowOverride All
1371
+ echo Require local
1372
+ echo Require ip !$ipNetworkPart!
1373
+ echo ^ < /Directory^ >
1374
+ echo :
1375
+ echo SSLEngine on
1376
+ echo :
1377
+ echo SSLCertificateFile " !$config[wampServerExtensionsPath]! /certs/!$config[hostname]! /server.crt"
1378
+ echo SSLCertificateKeyFile " !$config[wampServerExtensionsPath]! /certs/!$config[hostname]! /private.key"
1379
+ echo :
1380
+ echo LogFormat " %%L [%% {%%a , %%d -%%b -%%g %%T }t %% {%%z }t] %%H %%m \" %%U%%q \" (%%b bytes) %% >s" access
1381
+ echo CustomLog " !$config[wampServerExtensionsPath]! /logs/!$config[hostname]! /access.log" access
1382
+ echo :
1383
+ echo ErrorLogFormat " %%L [%%t ] [%% -m:%%l ] [pid %%P :tid %%T ] %%E : %%a %%M "
1384
+ echo ErrorLog " !$config[wampServerExtensionsPath]! /logs/!$config[hostname]! /error.log"
1385
+ echo :
1386
+ echo LogFormat " %%L [%% {%%a , %%d -%%b -%%g %%T }t %% {%%z }t] %%H %% {SSL_PROTOCOL}x %% {SSL_CIPHER}x %%m \" %%U%%q \" (%%b bytes) %% >s" ssl
1387
+ echo CustomLog " !$config[wampServerExtensionsPath]! /logs/!$config[hostname]! /ssl_request.log" ssl
1388
+ echo :
1389
+ echo SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
1390
+ echo Protocols h2 http/1.1
1391
+ echo :
1392
+ echo ^ < /VirtualHost^ >
1393
+
1394
+ exit /B
1395
+
1396
+
1340
1397
rem ------------------------------------------
1341
1398
rem Include SSL in Apache configuration file
1342
1399
rem ------------------------------------------
0 commit comments