This file is indexed.

/usr/share/doc/python3-certbot-apache/html/api/configurator.html is in python-certbot-apache-doc 0.23.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>certbot_apache.configurator &mdash; certbot-apache 0 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="../genindex.html"/>
        <link rel="search" title="Search" href="../search.html"/>
    <link rel="top" title="certbot-apache 0 documentation" href="../index.html"/>
        <link rel="up" title="API Documentation" href="../api.html"/>
        <link rel="next" title="certbot_apache.display_ops" href="display_ops.html"/>
        <link rel="prev" title="certbot_apache.augeas_configurator" href="augeas_configurator.html"/> 

  
  <script src="../_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="../index.html" class="icon icon-home"> certbot-apache
          

          
          </a>

          
            
            
              <div class="version">
                0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">API Documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="augeas_configurator.html"><code class="docutils literal"><span class="pre">certbot_apache.augeas_configurator</span></code></a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">certbot_apache.configurator</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="display_ops.html"><code class="docutils literal"><span class="pre">certbot_apache.display_ops</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="obj.html"><code class="docutils literal"><span class="pre">certbot_apache.obj</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="parser.html"><code class="docutils literal"><span class="pre">certbot_apache.parser</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="tls_sni_01.html"><code class="docutils literal"><span class="pre">certbot_apache.tls_sni_01</span></code></a></li>
</ul>
</li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">certbot-apache</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../api.html">API Documentation</a> &raquo;</li>
        
      <li><code class="docutils literal"><span class="pre">certbot_apache.configurator</span></code></li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="../_sources/api/configurator.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="module-certbot_apache.configurator">
<span id="certbot-apache-configurator"></span><h1><a class="reference internal" href="#module-certbot_apache.configurator" title="certbot_apache.configurator"><code class="xref py py-mod docutils literal"><span class="pre">certbot_apache.configurator</span></code></a><a class="headerlink" href="#module-certbot_apache.configurator" title="Permalink to this headline"></a></h1>
<p>Apache Configuration based off of Augeas Configurator.</p>
<dl class="class">
<dt id="certbot_apache.configurator.ApacheConfigurator">
<em class="property">class </em><code class="descclassname">certbot_apache.configurator.</code><code class="descname">ApacheConfigurator</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="augeas_configurator.html#certbot_apache.augeas_configurator.AugeasConfigurator" title="certbot_apache.augeas_configurator.AugeasConfigurator"><code class="xref py py-class docutils literal"><span class="pre">certbot_apache.augeas_configurator.AugeasConfigurator</span></code></a></p>
<p>Apache configurator.</p>
<p>State of Configurator: This code has been been tested and built for Ubuntu
14.04 Apache 2.4 and it works for Ubuntu 12.04 Apache 2.2</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Variables:</th><td class="field-body"><ul class="first last simple">
<li><strong>config</strong> – Configuration.</li>
<li><a class="reference internal" href="parser.html#module-certbot_apache.parser" title="certbot_apache.parser"><strong>parser</strong></a> – Handles low level parsing</li>
<li><strong>version</strong> (<em>tup</em>) – version of Apache</li>
<li><strong>vhosts</strong> (<em>list</em>) – All vhosts found in the configuration
(<code class="xref py py-class docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>)</li>
<li><strong>assoc</strong> (<em>dict</em>) – Mapping between domains and vhosts</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.constant">
<code class="descname">constant</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.constant"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.constant" title="Permalink to this definition"></a></dt>
<dd><p>Get constant for OS_DEFAULTS</p>
</dd></dl>

<dl class="attribute">
<dt id="certbot_apache.configurator.ApacheConfigurator.mod_ssl_conf">
<code class="descname">mod_ssl_conf</code><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.mod_ssl_conf" title="Permalink to this definition"></a></dt>
<dd><p>Full absolute path to SSL configuration file.</p>
</dd></dl>

<dl class="attribute">
<dt id="certbot_apache.configurator.ApacheConfigurator.updated_mod_ssl_conf_digest">
<code class="descname">updated_mod_ssl_conf_digest</code><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.updated_mod_ssl_conf_digest" title="Permalink to this definition"></a></dt>
<dd><p>Full absolute path to digest of updated SSL configuration file.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.prepare">
<code class="descname">prepare</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.prepare"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.prepare" title="Permalink to this definition"></a></dt>
<dd><p>Prepare the authenticator/installer.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple">
<li><strong>errors.NoInstallationError</strong> – If Apache configs cannot be found</li>
<li><strong>errors.MisconfigurationError</strong> – If Apache is misconfigured</li>
<li><strong>errors.NotSupportedError</strong> – If Apache version is not supported</li>
<li><strong>errors.PluginError</strong> – If there is any other error</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._check_aug_version">
<code class="descname">_check_aug_version</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._check_aug_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._check_aug_version" title="Permalink to this definition"></a></dt>
<dd><p>Checks that we have recent enough version of libaugeas.
If augeas version is recent enough, it will support case insensitive
regexp matching</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.get_parser">
<code class="descname">get_parser</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.get_parser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.get_parser" title="Permalink to this definition"></a></dt>
<dd><p>Initializes the ApacheParser</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._wildcard_domain">
<code class="descname">_wildcard_domain</code><span class="sig-paren">(</span><em>domain</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._wildcard_domain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._wildcard_domain" title="Permalink to this definition"></a></dt>
<dd><p>Checks if domain is a wildcard domain</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>domain</strong> (<em>str</em>) – Domain to check</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">If the domain is wildcard domain</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.deploy_cert">
<code class="descname">deploy_cert</code><span class="sig-paren">(</span><em>domain</em>, <em>cert_path</em>, <em>key_path</em>, <em>chain_path=None</em>, <em>fullchain_path=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.deploy_cert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.deploy_cert" title="Permalink to this definition"></a></dt>
<dd><p>Deploys certificate to specified virtual host.</p>
<p>Currently tries to find the last directives to deploy the certificate
in the VHost associated with the given domain. If it can’t find the
directives, it searches the “included” confs. The function verifies
that it has located the three directives and finally modifies them
to point to the correct destination. After the certificate is
installed, the VirtualHost is enabled if it isn’t already.</p>
<div class="admonition-todo admonition" id="index-0">
<p class="first admonition-title">Todo</p>
<p class="last">Might be nice to remove chain directive if none exists
This shouldn’t happen within certbot though</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.PluginError</strong> – When unable to deploy certificate due to
a lack of directives</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.choose_vhosts">
<code class="descname">choose_vhosts</code><span class="sig-paren">(</span><em>domain</em>, <em>create_if_no_ssl=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.choose_vhosts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.choose_vhosts" title="Permalink to this definition"></a></dt>
<dd><p>Finds VirtualHosts that can be used with the provided domain</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>domain</strong> (<em>str</em>) – Domain name to match VirtualHosts to</li>
<li><strong>create_if_no_ssl</strong> (<em>bool</em>) – If found VirtualHost doesn’t have a HTTPS
counterpart, should one get created</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">List of VirtualHosts or None</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal"><span class="pre">list</span></code> of <a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._vhosts_for_wildcard">
<code class="descname">_vhosts_for_wildcard</code><span class="sig-paren">(</span><em>domain</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._vhosts_for_wildcard"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._vhosts_for_wildcard" title="Permalink to this definition"></a></dt>
<dd><p>Get VHost objects for every VirtualHost that the user wants to handle
with the wildcard certificate.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._in_wildcard_scope">
<code class="descname">_in_wildcard_scope</code><span class="sig-paren">(</span><em>name</em>, <em>domain</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._in_wildcard_scope"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._in_wildcard_scope" title="Permalink to this definition"></a></dt>
<dd><p>Helper method for _vhosts_for_wildcard() that makes sure that the domain
is in the scope of wildcard domain.</p>
<p>eg. in scope: domain = <a href="#id1"><span class="problematic" id="id2">*</span></a>.wild.card, name = 1.wild.card
not in scope: domain = <a href="#id3"><span class="problematic" id="id4">*</span></a>.wild.card, name = 1.2.wild.card</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._choose_vhosts_wildcard">
<code class="descname">_choose_vhosts_wildcard</code><span class="sig-paren">(</span><em>domain</em>, <em>create_ssl=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._choose_vhosts_wildcard"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._choose_vhosts_wildcard" title="Permalink to this definition"></a></dt>
<dd><p>Prompts user to choose vhosts to install a wildcard certificate for</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._deploy_cert">
<code class="descname">_deploy_cert</code><span class="sig-paren">(</span><em>vhost</em>, <em>cert_path</em>, <em>key_path</em>, <em>chain_path</em>, <em>fullchain_path</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._deploy_cert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._deploy_cert" title="Permalink to this definition"></a></dt>
<dd><p>Helper function for deploy_cert() that handles the actual deployment
this exists because we might want to do multiple deployments per
domain originally passed for deploy_cert(). This is especially true
with wildcard certificates</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.choose_vhost">
<code class="descname">choose_vhost</code><span class="sig-paren">(</span><em>target_name</em>, <em>temp=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.choose_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.choose_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Chooses a virtual host based on the given domain name.</p>
<p>If there is no clear virtual host to be selected, the user is prompted
with all available choices.</p>
<p>The returned vhost is guaranteed to have TLS enabled unless temp is
True. If temp is True, there is no such guarantee and the result is
not cached.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>target_name</strong> (<em>str</em>) – domain name</li>
<li><strong>temp</strong> (<em>bool</em>) – whether the vhost is only used temporarily</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">ssl vhost associated with name</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a></p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>errors.PluginError</strong> – If no vhost is available or chosen</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.included_in_wildcard">
<code class="descname">included_in_wildcard</code><span class="sig-paren">(</span><em>names</em>, <em>target_name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.included_in_wildcard"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.included_in_wildcard" title="Permalink to this definition"></a></dt>
<dd><p>Is target_name covered by a wildcard?</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>names</strong> (<code class="xref py py-obj docutils literal"><span class="pre">collections.Iterable</span></code> of <code class="xref py py-obj docutils literal"><span class="pre">str</span></code>) – server aliases</li>
<li><strong>target_name</strong> (<em>str</em>) – name to compare with wildcards</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if target_name is covered by a wildcard,
otherwise, False</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.find_best_http_vhost">
<code class="descname">find_best_http_vhost</code><span class="sig-paren">(</span><em>target</em>, <em>filter_defaults</em>, <em>port='80'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.find_best_http_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.find_best_http_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Returns non-HTTPS vhost objects found from the Apache config</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>target</strong> (<em>str</em>) – Domain name of the desired VirtualHost</li>
<li><strong>filter_defaults</strong> (<em>bool</em>) – whether _default_ vhosts should be
included if it is the best match</li>
<li><strong>port</strong> (<em>str</em>) – port number the vhost should be listening on</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">VirtualHost object that’s the best match for target name</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal"><span class="pre">obj.VirtualHost</span></code> or None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._find_best_vhost">
<code class="descname">_find_best_vhost</code><span class="sig-paren">(</span><em>target_name</em>, <em>vhosts=None</em>, <em>filter_defaults=True</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._find_best_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._find_best_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Finds the best vhost for a target_name.</p>
<p>This does not upgrade a vhost to HTTPS… it only finds the most
appropriate vhost for the given target_name.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>target_name</strong> (<em>str</em>) – domain handled by the desired vhost</li>
<li><strong>vhosts</strong> (<code class="xref py py-obj docutils literal"><span class="pre">collections.Iterable</span></code> of <a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – vhosts to consider</li>
<li><strong>filter_defaults</strong> (<em>bool</em>) – whether a vhost with a _default_
addr is acceptable</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">VHost or None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._non_default_vhosts">
<code class="descname">_non_default_vhosts</code><span class="sig-paren">(</span><em>vhosts</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._non_default_vhosts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._non_default_vhosts" title="Permalink to this definition"></a></dt>
<dd><p>Return all non _default_ only vhosts.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.get_all_names">
<code class="descname">get_all_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.get_all_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.get_all_names" title="Permalink to this definition"></a></dt>
<dd><p>Returns all names found in the Apache Configuration.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">All ServerNames, ServerAliases, and reverse DNS entries for
virtual host addresses</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">set</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.get_name_from_ip">
<code class="descname">get_name_from_ip</code><span class="sig-paren">(</span><em>addr</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.get_name_from_ip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.get_name_from_ip" title="Permalink to this definition"></a></dt>
<dd><p>Returns a reverse dns name if available.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>addr</strong> (<em>Addr</em>) – IP Address</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">name or empty string if name cannot be determined</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._get_vhost_names">
<code class="descname">_get_vhost_names</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._get_vhost_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._get_vhost_names" title="Permalink to this definition"></a></dt>
<dd><p>Helper method for getting the ServerName and
ServerAlias values from vhost in path</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> – Path to read ServerName and ServerAliases from</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Tuple including ServerName and <code class="xref py py-obj docutils literal"><span class="pre">list</span></code> of ServerAlias strings</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._add_servernames">
<code class="descname">_add_servernames</code><span class="sig-paren">(</span><em>host</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._add_servernames"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._add_servernames" title="Permalink to this definition"></a></dt>
<dd><p>Helper function for get_virtual_hosts().</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>host</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – In progress vhost whose names will be added</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._create_vhost">
<code class="descname">_create_vhost</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._create_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._create_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Used by get_virtual_hosts to create vhost objects</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<em>str</em>) – Augeas path to virtual host</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">newly created vhost</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.get_virtual_hosts">
<code class="descname">get_virtual_hosts</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.get_virtual_hosts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.get_virtual_hosts" title="Permalink to this definition"></a></dt>
<dd><p>Returns list of virtual hosts found in the Apache configuration.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">List of <a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>
objects found in configuration</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.is_name_vhost">
<code class="descname">is_name_vhost</code><span class="sig-paren">(</span><em>target_addr</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.is_name_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.is_name_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Returns if vhost is a name based vhost</p>
<p>NameVirtualHost was deprecated in Apache 2.4 as all VirtualHosts are
now NameVirtualHosts. If version is earlier than 2.4, check if addr
has a NameVirtualHost directive in the Apache config</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>target_addr</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.Addr" title="certbot_apache.obj.Addr"><em>certbot_apache.obj.Addr</em></a>) – vhost address</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Success</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.add_name_vhost">
<code class="descname">add_name_vhost</code><span class="sig-paren">(</span><em>addr</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.add_name_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.add_name_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Adds NameVirtualHost directive for given address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>addr</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.Addr" title="certbot_apache.obj.Addr"><code class="xref py py-class docutils literal"><span class="pre">Addr</span></code></a>) – Address that will be added as NameVirtualHost directive</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.prepare_server_https">
<code class="descname">prepare_server_https</code><span class="sig-paren">(</span><em>port</em>, <em>temp=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.prepare_server_https"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.prepare_server_https" title="Permalink to this definition"></a></dt>
<dd><p>Prepare the server for HTTPS.</p>
<p>Make sure that the ssl_module is loaded and that the server
is appropriately listening on port.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>port</strong> (<em>str</em>) – Port to listen on</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.ensure_listen">
<code class="descname">ensure_listen</code><span class="sig-paren">(</span><em>port</em>, <em>https=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.ensure_listen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.ensure_listen" title="Permalink to this definition"></a></dt>
<dd><p>Make sure that Apache is listening on the port. Checks if the
Listen statement for the port already exists, and adds it to the
configuration if necessary.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>port</strong> (<em>str</em>) – Port number to check and add Listen for if not in
place already</li>
<li><strong>https</strong> (<em>bool</em>) – If the port will be used for HTTPS</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._add_listens_http">
<code class="descname">_add_listens_http</code><span class="sig-paren">(</span><em>listens</em>, <em>listens_orig</em>, <em>port</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._add_listens_http"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._add_listens_http" title="Permalink to this definition"></a></dt>
<dd><p>Helper method for ensure_listen to figure out which new
listen statements need adding for listening HTTP on port</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>listens</strong> (<em>set</em>) – Set of all needed Listen statements</li>
<li><strong>listens_orig</strong> (<em>list</em>) – List of existing listen statements</li>
<li><strong>port</strong> (<em>string</em>) – Port number we’re adding</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._add_listens_https">
<code class="descname">_add_listens_https</code><span class="sig-paren">(</span><em>listens</em>, <em>listens_orig</em>, <em>port</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._add_listens_https"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._add_listens_https" title="Permalink to this definition"></a></dt>
<dd><p>Helper method for ensure_listen to figure out which new
listen statements need adding for listening HTTPS on port</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>listens</strong> (<em>set</em>) – Set of all needed Listen statements</li>
<li><strong>listens_orig</strong> (<em>list</em>) – List of existing listen statements</li>
<li><strong>port</strong> (<em>string</em>) – Port number we’re adding</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._has_port_already">
<code class="descname">_has_port_already</code><span class="sig-paren">(</span><em>listens</em>, <em>port</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._has_port_already"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._has_port_already" title="Permalink to this definition"></a></dt>
<dd><p>Helper method for prepare_server_https to find out if user
already has an active Listen statement for the port we need</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>listens</strong> (<em>list</em>) – List of listen variables</li>
<li><strong>port</strong> (<em>string</em>) – Port in question</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.prepare_https_modules">
<code class="descname">prepare_https_modules</code><span class="sig-paren">(</span><em>temp</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.prepare_https_modules"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.prepare_https_modules" title="Permalink to this definition"></a></dt>
<dd><p>Helper method for prepare_server_https, taking care of enabling
needed modules</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>temp</strong> (<em>boolean</em>) – If the change is temporary</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.make_addrs_sni_ready">
<code class="descname">make_addrs_sni_ready</code><span class="sig-paren">(</span><em>addrs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.make_addrs_sni_ready"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.make_addrs_sni_ready" title="Permalink to this definition"></a></dt>
<dd><p>Checks to see if the server is ready for SNI challenges.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>addrs</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.Addr" title="certbot_apache.obj.Addr"><code class="xref py py-class docutils literal"><span class="pre">Addr</span></code></a>) – Addresses to check SNI compatibility</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.make_vhost_ssl">
<code class="descname">make_vhost_ssl</code><span class="sig-paren">(</span><em>nonssl_vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.make_vhost_ssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.make_vhost_ssl" title="Permalink to this definition"></a></dt>
<dd><p>Makes an ssl_vhost version of a nonssl_vhost.</p>
<p>Duplicates vhost and adds default ssl options
New vhost will reside as (nonssl_vhost.path) +
<code class="docutils literal"><span class="pre">self.constant(&quot;le_vhost_ext&quot;)</span></code></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This function saves the configuration</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>nonssl_vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – Valid VH that doesn’t have SSLEngine on</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">SSL vhost</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a></td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.PluginError</strong> – If more than one virtual host is in
the file or if plugin is unable to write/read vhost files.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._get_new_vh_path">
<code class="descname">_get_new_vh_path</code><span class="sig-paren">(</span><em>orig_matches</em>, <em>new_matches</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._get_new_vh_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._get_new_vh_path" title="Permalink to this definition"></a></dt>
<dd><p>Helper method for make_vhost_ssl for matching augeas paths. Returns
VirtualHost path from new_matches that’s not present in orig_matches.</p>
<p>Paths are normalized, because augeas leaves indices out for paths
with only single directive with a similar key</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._get_ssl_vhost_path">
<code class="descname">_get_ssl_vhost_path</code><span class="sig-paren">(</span><em>non_ssl_vh_fp</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._get_ssl_vhost_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._get_ssl_vhost_path" title="Permalink to this definition"></a></dt>
<dd><p>Get a file path for SSL vhost, uses user defined path as priority,
but if the value is invalid or not defined, will fall back to non-ssl
vhost filepath.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>non_ssl_vh_fp</strong> (<em>str</em>) – Filepath of non-SSL vhost</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Filepath for SSL vhost</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._sift_rewrite_rule">
<code class="descname">_sift_rewrite_rule</code><span class="sig-paren">(</span><em>line</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._sift_rewrite_rule"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._sift_rewrite_rule" title="Permalink to this definition"></a></dt>
<dd><p>Decides whether a line should be copied to a SSL vhost.</p>
<p>A canonical example of when sifting a line is required:
When the http vhost contains a RewriteRule that unconditionally
redirects any request to the https version of the same site.
e.g:
RewriteRule ^ <a class="reference external" href="https:/">https:/</a>/%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent]
Copying the above line to the ssl vhost would cause a
redirection loop.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>line</strong> (<em>str</em>) – a line extracted from the http vhost.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True - don’t copy line from http vhost to SSL vhost.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._copy_create_ssl_vhost_skeleton">
<code class="descname">_copy_create_ssl_vhost_skeleton</code><span class="sig-paren">(</span><em>vhost</em>, <em>ssl_fp</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._copy_create_ssl_vhost_skeleton"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._copy_create_ssl_vhost_skeleton" title="Permalink to this definition"></a></dt>
<dd><p>Copies over existing Vhost with IfModule mod_ssl.c&gt; skeleton.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><em>obj.VirtualHost</em></a>) – Original VirtualHost object</li>
<li><strong>ssl_fp</strong> (<em>str</em>) – Full path where the new ssl_vhost will reside.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>A new file is created on the filesystem.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._sift_rewrite_rules">
<code class="descname">_sift_rewrite_rules</code><span class="sig-paren">(</span><em>contents</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._sift_rewrite_rules"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._sift_rewrite_rules" title="Permalink to this definition"></a></dt>
<dd><p>Helper function for _copy_create_ssl_vhost_skeleton to prepare the
new HTTPS VirtualHost contents. Currently disabling the rewrites</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._get_vhost_block">
<code class="descname">_get_vhost_block</code><span class="sig-paren">(</span><em>vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._get_vhost_block"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._get_vhost_block" title="Permalink to this definition"></a></dt>
<dd><p>Helper method to get VirtualHost contents from the original file.
This is done with help of augeas span, which returns the span start and
end positions</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-obj docutils literal"><span class="pre">list</span></code> of VirtualHost block content lines without closing tag</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._remove_closing_vhost_tag">
<code class="descname">_remove_closing_vhost_tag</code><span class="sig-paren">(</span><em>vh_contents</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._remove_closing_vhost_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._remove_closing_vhost_tag" title="Permalink to this definition"></a></dt>
<dd><p>Removes the closing VirtualHost tag if it exists.</p>
<p>This method modifies vh_contents directly to remove the closing
tag. If the closing vhost tag is found, everything on the line
after it is also removed. Whether or not this tag is included
in the result of span depends on the Augeas version.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vh_contents</strong> (<em>list</em>) – VirtualHost block contents to check</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._has_matching_wildcard">
<code class="descname">_has_matching_wildcard</code><span class="sig-paren">(</span><em>vh_path</em>, <em>target_name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._has_matching_wildcard"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._has_matching_wildcard" title="Permalink to this definition"></a></dt>
<dd><p>Is target_name already included in a wildcard in the vhost?</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>vh_path</strong> (<em>str</em>) – Augeas path to the vhost</li>
<li><strong>target_name</strong> (<em>str</em>) – name to compare with wildcards</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if there is a wildcard covering target_name in
the vhost in vhost_path, otherwise, False</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._add_name_vhost_if_necessary">
<code class="descname">_add_name_vhost_if_necessary</code><span class="sig-paren">(</span><em>vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._add_name_vhost_if_necessary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._add_name_vhost_if_necessary" title="Permalink to this definition"></a></dt>
<dd><p>Add NameVirtualHost Directives if necessary for new vhost.</p>
<p>NameVirtualHosts was a directive in Apache &lt; 2.4
<a class="reference external" href="https://httpd.apache.org/docs/2.2/mod/core.html#namevirtualhost">https://httpd.apache.org/docs/2.2/mod/core.html#namevirtualhost</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – New virtual host that was recently created.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.supported_enhancements">
<code class="descname">supported_enhancements</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.supported_enhancements"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.supported_enhancements" title="Permalink to this definition"></a></dt>
<dd><p>Returns currently supported enhancements.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.enhance">
<code class="descname">enhance</code><span class="sig-paren">(</span><em>domain</em>, <em>enhancement</em>, <em>options=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.enhance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.enhance" title="Permalink to this definition"></a></dt>
<dd><p>Enhance configuration.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>domain</strong> (<em>str</em>) – domain to enhance</li>
<li><strong>enhancement</strong> (<em>str</em>) – enhancement type defined in
<code class="xref py py-const docutils literal"><span class="pre">ENHANCEMENTS</span></code></li>
<li><strong>options</strong> – options for the enhancement
See <code class="xref py py-const docutils literal"><span class="pre">ENHANCEMENTS</span></code>
documentation for appropriate parameter.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>errors.PluginError</strong> – If Enhancement is not supported, or if
there is any other problem with the enhancement.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._enable_ocsp_stapling">
<code class="descname">_enable_ocsp_stapling</code><span class="sig-paren">(</span><em>ssl_vhost</em>, <em>unused_options</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._enable_ocsp_stapling"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._enable_ocsp_stapling" title="Permalink to this definition"></a></dt>
<dd><p>Enables OCSP Stapling</p>
<p>In OCSP, each client (e.g. browser) would have to query the
OCSP Responder to validate that the site certificate was not revoked.</p>
<p>Enabling OCSP Stapling, would allow the web-server to query the OCSP
Responder, and staple its response to the offered certificate during
TLS. i.e. clients would not have to query the OCSP responder.</p>
<p>OCSP Stapling enablement on Apache implicitly depends on
SSLCertificateChainFile being set by other code.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This function saves the configuration</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ssl_vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – Destination of traffic, an ssl enabled vhost</li>
<li><strong>unused_options</strong> (<em>Not Available</em>) – Not currently used</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Success, general_vhost (HTTP vhost)</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">(bool, <a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>)</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._set_http_header">
<code class="descname">_set_http_header</code><span class="sig-paren">(</span><em>ssl_vhost</em>, <em>header_substring</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._set_http_header"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._set_http_header" title="Permalink to this definition"></a></dt>
<dd><p>Enables header that is identified by header_substring on ssl_vhost.</p>
<p>If the header identified by header_substring is not already set,
a new Header directive is placed in ssl_vhost’s configuration with
arguments from: constants.HTTP_HEADER[header_substring]</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This function saves the configuration</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>ssl_vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – Destination of traffic, an ssl enabled vhost</li>
<li><strong>header_substring</strong> – string that uniquely identifies a header.
e.g: Strict-Transport-Security, Upgrade-Insecure-Requests.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:type str</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Success, general_vhost (HTTP vhost)</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">(bool, <a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>)</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.PluginError</strong> – If no viable HTTP host can be created or
set with header header_substring.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._verify_no_matching_http_header">
<code class="descname">_verify_no_matching_http_header</code><span class="sig-paren">(</span><em>ssl_vhost</em>, <em>header_substring</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._verify_no_matching_http_header"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._verify_no_matching_http_header" title="Permalink to this definition"></a></dt>
<dd><p>Checks to see if an there is an existing Header directive that
contains the string header_substring.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>ssl_vhost</strong> – vhost to check</li>
<li><strong>header_substring</strong> – string that uniquely identifies a header.
e.g: Strict-Transport-Security, Upgrade-Insecure-Requests.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:type str</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">boolean</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">(bool)</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>:raises errors.PluginEnhancementAlreadyPresent When header</dt>
<dd>header_substring exists</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._enable_redirect">
<code class="descname">_enable_redirect</code><span class="sig-paren">(</span><em>ssl_vhost</em>, <em>unused_options</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._enable_redirect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._enable_redirect" title="Permalink to this definition"></a></dt>
<dd><p>Redirect all equivalent HTTP traffic to ssl_vhost.</p>
<div class="admonition-todo admonition" id="index-1">
<p class="first admonition-title">Todo</p>
<p class="last">This enhancement should be rewritten and will
unfortunately require lots of debugging by hand.</p>
</div>
<p>Adds Redirect directive to the port 80 equivalent of ssl_vhost
First the function attempts to find the vhost with equivalent
ip addresses that serves on non-ssl ports
The function then adds the directive</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This function saves the configuration</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ssl_vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – Destination of traffic, an ssl enabled vhost</li>
<li><strong>unused_options</strong> (<em>Not Available</em>) – Not currently used</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><strong>errors.PluginError</strong> – If no viable HTTP host can be created or
used for the redirect.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._verify_no_certbot_redirect">
<code class="descname">_verify_no_certbot_redirect</code><span class="sig-paren">(</span><em>vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._verify_no_certbot_redirect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._verify_no_certbot_redirect" title="Permalink to this definition"></a></dt>
<dd><p>Checks to see if a redirect was already installed by certbot.</p>
<p>Checks to see if virtualhost already contains a rewrite rule that is
identical to Certbot’s redirection rewrite rule.</p>
<p>For graceful transition to new rewrite rules for HTTPS redireciton we
delete certbot’s old rewrite rules and set the new one instead.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – vhost to check</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.PluginEnhancementAlreadyPresent</strong> – When the exact
certbot redirection WriteRule exists in virtual host.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._is_rewrite_exists">
<code class="descname">_is_rewrite_exists</code><span class="sig-paren">(</span><em>vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._is_rewrite_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._is_rewrite_exists" title="Permalink to this definition"></a></dt>
<dd><p>Checks if there exists a RewriteRule directive in vhost</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – vhost to check</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if a RewriteRule directive exists.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._is_rewrite_engine_on">
<code class="descname">_is_rewrite_engine_on</code><span class="sig-paren">(</span><em>vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._is_rewrite_engine_on"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._is_rewrite_engine_on" title="Permalink to this definition"></a></dt>
<dd><p>Checks if a RewriteEngine directive is on</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – vhost to check</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._create_redirect_vhost">
<code class="descname">_create_redirect_vhost</code><span class="sig-paren">(</span><em>ssl_vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._create_redirect_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._create_redirect_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Creates an http_vhost specifically to redirect for the ssl_vhost.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>ssl_vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – ssl vhost</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">tuple of the form
(<code class="xref py py-obj docutils literal"><span class="pre">success</span></code>, <a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>)</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">tuple</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._get_http_vhost">
<code class="descname">_get_http_vhost</code><span class="sig-paren">(</span><em>ssl_vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._get_http_vhost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._get_http_vhost" title="Permalink to this definition"></a></dt>
<dd><p>Find appropriate HTTP vhost for ssl_vhost.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._get_proposed_addrs">
<code class="descname">_get_proposed_addrs</code><span class="sig-paren">(</span><em>vhost</em>, <em>port='80'</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._get_proposed_addrs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._get_proposed_addrs" title="Permalink to this definition"></a></dt>
<dd><p>Return all addrs of vhost with the port replaced with the specified.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>ssl_vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><em>obj.VirtualHost</em></a>) – Original Vhost</li>
<li><strong>port</strong> (<em>str</em>) – Desired port for new addresses</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal"><span class="pre">set</span></code> of <code class="xref py py-class docutils literal"><span class="pre">Addr</span></code></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.enable_site">
<code class="descname">enable_site</code><span class="sig-paren">(</span><em>vhost</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.enable_site"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.enable_site" title="Permalink to this definition"></a></dt>
<dd><p>Enables an available site, Apache reload required.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Does not make sure that the site correctly works or that all
modules are enabled appropriately.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The distribution specific override replaces functionality
of this method where available.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>vhost</strong> (<a class="reference internal" href="obj.html#certbot_apache.obj.VirtualHost" title="certbot_apache.obj.VirtualHost"><code class="xref py py-class docutils literal"><span class="pre">VirtualHost</span></code></a>) – vhost to enable</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.NotSupportedError</strong> – If filesystem layout is not
supported.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.enable_mod">
<code class="descname">enable_mod</code><span class="sig-paren">(</span><em>mod_name</em>, <em>temp=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.enable_mod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.enable_mod" title="Permalink to this definition"></a></dt>
<dd><p>Enables module in Apache.</p>
<p>Both enables and reloads Apache so module is active.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>mod_name</strong> (<em>str</em>) – Name of the module to enable. (e.g. ‘ssl’)</li>
<li><strong>temp</strong> (<em>bool</em>) – Whether or not this is a temporary action.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The distribution specific override replaces functionality
of this method where available.</p>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.MisconfigurationError</strong> – We cannot enable modules in
generic fashion.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.restart">
<code class="descname">restart</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.restart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.restart" title="Permalink to this definition"></a></dt>
<dd><p>Runs a config test and reloads the Apache server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.MisconfigurationError</strong> – If either the config test
or reload fails.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator._reload">
<code class="descname">_reload</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator._reload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator._reload" title="Permalink to this definition"></a></dt>
<dd><p>Reloads the Apache server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.MisconfigurationError</strong> – If reload fails</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.config_test">
<code class="descname">config_test</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.config_test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.config_test" title="Permalink to this definition"></a></dt>
<dd><p>Check the configuration of Apache for errors.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>errors.MisconfigurationError</strong> – If config_test fails</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.get_version">
<code class="descname">get_version</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.get_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.get_version" title="Permalink to this definition"></a></dt>
<dd><p>Return version of Apache Server.</p>
<p>Version is returned as tuple. (ie. 2.4.7 = (2, 4, 7))</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">version</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">tuple</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><strong>PluginError</strong> – if unable to find Apache version</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.more_info">
<code class="descname">more_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.more_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.more_info" title="Permalink to this definition"></a></dt>
<dd><p>Human-readable string to help understand the module</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.get_chall_pref">
<code class="descname">get_chall_pref</code><span class="sig-paren">(</span><em>unused_domain</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.get_chall_pref"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.get_chall_pref" title="Permalink to this definition"></a></dt>
<dd><p>Return list of challenge preferences.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.perform">
<code class="descname">perform</code><span class="sig-paren">(</span><em>achalls</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.perform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.perform" title="Permalink to this definition"></a></dt>
<dd><p>Perform the configuration related challenge.</p>
<p>This function currently assumes all challenges will be fulfilled.
If this turns out not to be the case in the future. Cleanup and
outstanding challenges will have to be designed better.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.cleanup">
<code class="descname">cleanup</code><span class="sig-paren">(</span><em>achalls</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.cleanup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.cleanup" title="Permalink to this definition"></a></dt>
<dd><p>Revert all challenges.</p>
</dd></dl>

<dl class="method">
<dt id="certbot_apache.configurator.ApacheConfigurator.install_ssl_options_conf">
<code class="descname">install_ssl_options_conf</code><span class="sig-paren">(</span><em>options_ssl</em>, <em>options_ssl_digest</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/certbot_apache/configurator.html#ApacheConfigurator.install_ssl_options_conf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#certbot_apache.configurator.ApacheConfigurator.install_ssl_options_conf" title="Permalink to this definition"></a></dt>
<dd><p>Copy Certbot’s SSL options file into the system’s config dir if required.</p>
</dd></dl>

</dd></dl>

</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="display_ops.html" class="btn btn-neutral float-right" title="certbot_apache.display_ops" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="augeas_configurator.html" class="btn btn-neutral" title="certbot_apache.augeas_configurator" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2014-2018, Let&#39;s Encrypt Project.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'../',
            VERSION:'0',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="../_static/jquery.js"></script>
      <script type="text/javascript" src="../_static/underscore.js"></script>
      <script type="text/javascript" src="../_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="../_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>