Registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.

About project

This package contains the main binary of apache, a powerful, full-featured,
efficient and freely-available Web server. Apache is also the most popular Web
server on the Internet.

This version of apache is fully modular, and many modules are available in
pre-compiled formats, like PHP and mod_auth_external.

This package defaults to a maximum of 128 dynamically loadable modules.
This package defaults to a ServerLimit of 1024.

You can change these values at RPM build time by using for example:

--define 'maxmodules 512' --define 'serverlimit 2048'

The package was built to support a maximum of 128 dynamically loadable modules.
The package was built with a ServerLimit of 1024.

Last commit

avatar
alekseyz has added eb2bbbe888
Fix for 2016.1

Files in

100644 | 3584 lines (2774 sloc) | 145 KB
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
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
%define _build_pkgcheck_set %{nil}
%define _build_pkgcheck_srpm %{nil}

%define defaultmaxmodules 256
%define defaultserverlimit 2048

%define TAG %{vendor} Linux
%define BASEPRODUCT Apache
%define all_services httpd.service httpd-worker.service httpd-event.service

Summary:	The most widely used Web server on the Internet
Name:		apache
Version:	2.4.46
Release:	2
License:	Apache License
Group:		System/Servers
Url:		https://httpd.apache.org
Source0:	http://archive.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source3:	apache2_transparent_png_icons.tar.bz2
Source9:	htcacheclean.service
Source10:	htcacheclean.sysconfig
Source11:	ROSA.tar.gz
Source15:	httpd.service
Source16:	httpd.tmpfiles.d
Source17:	htcacheclean.tmpfiles.d
Source18:	apache.sysusers.d
Source100:	buildconf
Patch0:		httpd-2.0.45-deplibs.patch
Patch8:		httpd-2.1.10-apxs.patch
# speedups by Allen Pulsifer
Patch16:	httpd-2.2.4-fix_extra_htaccess_check.diff
Patch18:	httpd-2.2.10-ldap_auth_now_modular_in-apr-util-dbd-ldap_fix.diff
Patch19:	httpd-2.2.21-linux3.diff
Patch105:	httpd-2.2.17-filter.patch
Patch106:	httpd-2.4.18-rosa_config.diff
Patch107:	httpd-2.4.1-linkage_fix.diff
Patch108:	httpd-2.4.1-buildfix.diff
BuildRequires:	lynx
BuildRequires:	db-devel
BuildRequires:	gdbm-devel
BuildRequires:	openldap-devel
BuildRequires:	sasl-devel
# user() and group() provides generator
BuildRequires:	systemd
BuildRequires:	pkgconfig(apr-1) >= 1.5.0
BuildRequires:	pkgconfig(apr-util-1) >= 1.5.3
BuildRequires:	pkgconfig(expat)
BuildRequires:	pkgconfig(libpcre)
BuildRequires:	pkgconfig(libxml-2.0)
BuildRequires:	pkgconfig(lua) >= 5.1
BuildRequires:	pkgconfig(openssl)
BuildRequires:	pkgconfig(zlib)
# So people who "urpmi httpd" get what they expect
Provides:	httpd = %{EVRD}

%description
This package contains the main binary of apache, a powerful, full-featured,
efficient and freely-available Web server. Apache is also the most popular Web
server on the Internet.

This version of apache is fully modular, and many modules are available in
pre-compiled formats, like PHP and mod_auth_external.

This package defaults to a maximum of %{defaultmaxmodules} dynamically loadable modules.
This package defaults to a ServerLimit of %{defaultserverlimit}.

You can change these values at RPM build time by using for example:

--define 'maxmodules 512' --define 'serverlimit 2048' 

The package was built to support a maximum of %{?!maxmodules:%{defaultmaxmodules}}%{?maxmodules:%{maxmodules}} dynamically loadable modules.
The package was built with a ServerLimit of %{?!serverlimit:%{defaultserverlimit}}%{?serverlimit:%{serverlimit}}.

#----------------------------------------------------------------------------

%package mpm-prefork
Summary:	Implements a non-threaded, pre-forking web server (stable)
Group:		System/Servers
Requires:	apache-base = %{EVRD}
Requires:	apache-modules = %{EVRD}
Requires(post,preun,postun):	systemd-units
Provides:	webserver
Provides:	apache = %{EVRD}
Provides:	apache-mpm = %{EVRD}

%description mpm-prefork
This Multi-Processing Module (MPM) implements a non-threaded, pre-forking web
server that handles requests in a manner similar to Apache 1.3. It is
appropriate for sites that need to avoid threading for compatibility with
non-thread-safe libraries. It is also the best MPM for isolating each request,
so that a problem with a single request will not affect any other.

This MPM is very self-regulating, so it is rarely necessary to adjust its
configuration directives. Most important is that MaxClients be big enough to
handle as many simultaneous requests as you expect to receive, but small enough
to assure that there is enough physical RAM for all processes.

This package defaults to a maximum of %{defaultmaxmodules} dynamically loadable modules.
This package defaults to a ServerLimit of %{defaultserverlimit}.

You can change these values at RPM build time by using for example:

--define 'maxmodules 512' --define 'serverlimit 2048'

The package was built to support a maximum of %{?!maxmodules:%{defaultmaxmodules}}%{?maxmodules:%{maxmodules}} dynamically loadable modules.
The package was built with a ServerLimit of %{?!serverlimit:%{defaultserverlimit}}%{?serverlimit:%{serverlimit}}.

%files mpm-prefork
%attr(0755,root,root) %{_sbindir}/httpd
%{_unitdir}/httpd.service

%post mpm-prefork
%systemd_post httpd.service

%preun mpm-prefork
%systemd_preun httpd.service

%postun mpm-prefork
%systemd_postun_with_restart httpd.service

#----------------------------------------------------------------------------

%package mpm-worker
Summary:	Implements a hybrid multi-threaded multi-process web server (experimental)
Group:		System/Servers
Requires:	apache-base = %{EVRD}
Requires:	apache-modules = %{EVRD}
Requires(post,preun,postun):	systemd-units
Provides:	webserver
Provides:	apache = %{EVRD}
Conflicts:	apache-mod_php
Conflicts:	apache-mod_perl
Conflicts:	apache-mod_python

%description mpm-worker
This Multi-Processing Module (MPM) implements a hybrid multi-process
multi-threaded server. By using threads to serve requests, it is able to serve
a large number of requests with less system resources than a process-based
server. Yet it retains much of the stability of a process-based server by
keeping multiple processes available, each with many threads.

The most important directives used to control this MPM are ThreadsPerChild,
which controls the number of threads deployed by each child process and
MaxClients, which controls the maximum total number of threads that may be
launched.

This package contains the main binary of apache, a powerful, full-featured,
efficient and freely-available Web server. Apache is also the most popular Web
server on the Internet.

This version of apache is fully modular, and many modules are available in
pre-compiled formats, like PHP and mod_auth_external.

This package defaults to a maximum of %{defaultmaxmodules} dynamically loadable modules.

You can change these values at RPM build time by using for example:

--define 'maxmodules 512'

The package was built to support a maximum of %{?!maxmodules:%{defaultmaxmodules}}%{?maxmodules:%{maxmodules}} dynamically loadable modules.

%files mpm-worker
%attr(0755,root,root) %{_sbindir}/httpd-worker
%{_unitdir}/httpd-worker.service

%post mpm-worker
%systemd_post httpd-worker.service

%preun mpm-worker
%systemd_preun httpd-worker.service

%postun mpm-worker
%systemd_postun_with_restart httpd-worker.service

#----------------------------------------------------------------------------

%package mpm-event
Summary:	Implements a hybrid multi-threaded multi-process web server
Group:		System/Servers
Requires:	apache-base = %{EVRD}
Requires:	apache-modules = %{EVRD}
Requires(post,preun,postun):	systemd-units
Provides:	webserver
Provides:	apache = %{EVRD}
Conflicts:	apache-mod_php
Conflicts:	apache-mod_perl
Conflicts:	apache-mod_python

%description mpm-event
The event Multi-Processing Module (MPM) is designed to allow more requests to
be served simultaneously by passing off some processing work to supporting
threads, freeing up the main threads to work on new requests. It is based on
the worker MPM, which implements a hybrid multi-process multi-threaded server.
Run-time configuration directives are identical to those provided by worker.

This package contains the main binary of apache, a powerful, full-featured,
efficient and freely-available Web server. Apache is also the most popular Web
server on the Internet.

This version of apache is fully modular, and many modules are available in
pre-compiled formats, like PHP and mod_auth_external.

This package defaults to a maximum of %{defaultmaxmodules} dynamically loadable modules.

You can change these values at RPM build time by using for example:

--define 'maxmodules 512'

The package was built to support a maximum of %{?!maxmodules:%{defaultmaxmodules}}%{?maxmodules:%{maxmodules}} dynamically loadable modules.

%files mpm-event
%attr(0755,root,root) %{_sbindir}/httpd-event
%{_unitdir}/httpd-event.service

%post mpm-event
%systemd_post httpd-event.service

%preun mpm-event
%systemd_preun httpd-event.service

%postun mpm-event
%systemd_postun_with_restart httpd-event.service

#----------------------------------------------------------------------------

%package base
Summary:	Common files and utilities for apache
Group:		System/Servers
Requires:	apache = %{EVRD}
Requires(pre):	systemd
Provides:	apache-conf = %{EVRD}

%description base
This package contains the apache utilities such as Apache Bench (ab) for stress
testing your apache installation and several tools for managing user databases,
access control, the apache logs and more.

%files base
%doc upgrading.txt new_features_2_4.txt
%{_sysusersdir}/apache.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/httpd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/httpd
%dir %{_sysconfdir}/httpd
%dir %{_sysconfdir}/httpd/conf
%dir %{_sysconfdir}/httpd/conf/webapps.d
%dir %{_sysconfdir}/httpd/conf/vhosts.d
%dir %{_sysconfdir}/httpd/conf.d
%dir %{_sysconfdir}/httpd/modules.d
%dir %{_sysconfdir}/httpd/conf/extra
%dir %{_sysconfdir}/httpd/conf/original
%dir %{_sysconfdir}/httpd/conf/original/extra
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-autoindex.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-dav.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-default.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-info.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-languages.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-manual.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-mpm.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-multilang-errordoc.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-ssl.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-userdir.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-vhosts.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/extra/proxy-html.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/httpd.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/magic
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/mime.types
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-autoindex.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-dav.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-default.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-info.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-languages.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-manual.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-mpm.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-multilang-errordoc.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-ssl.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-userdir.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-vhosts.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/proxy-html.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/original/httpd.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/fileprotector.conf
%attr(0755,apache,apache) %dir /var/www
%attr(0755,apache,apache) %dir /var/run/httpd
%{_tmpfilesdir}/httpd.conf
%attr(0755,root,root) %dir /var/www/html
%dir /var/www/error
%dir /var/www/error/include
%dir /var/www/icons
/var/www/icons/*.svg
%dir /var/www/icons/small
%dir /var/log/httpd
%dir /var/www/cgi-bin
%dir /var/www/perl
%config(noreplace,missingok) /var/www/error/README
%config(noreplace,missingok) /var/www/error/*.var
%config(noreplace,missingok) /var/www/error/include/*.html
%attr(0644,root,root) /var/www/icons/README*
%attr(0644,root,root) /var/www/icons/*.png
%attr(0644,root,root) /var/www/icons/*.gif
%attr(0644,root,root) /var/www/icons/small/*.png
%attr(0644,root,root) /var/www/icons/small/*.gif
%attr(0644,root,root) %config(noreplace) /var/www/html/index.html
%attr(0644,root,root) %config(noreplace) /var/www/html/favicon.ico
%attr(0644,root,root) %config(noreplace) /var/www/html/robots.txt
%attr(0755,root,root) %{_bindir}/ab
%attr(0755,root,root) %{_bindir}/dbmmanage
%attr(0755,root,root) %{_bindir}/htdbm
%attr(0755,root,root) %{_bindir}/htdigest
%attr(0755,root,root) %{_bindir}/htpasswd
%attr(0755,root,root) %{_bindir}/httxt2dbm
%attr(0755,root,root) %{_bindir}/logresolve
%attr(0755,root,root) %{_sbindir}/apachectl
%attr(0755,root,root) %{_sbindir}/check_forensic
%attr(0755,root,root) %{_sbindir}/checkgid
%attr(0755,root,root) %{_sbindir}/fcgistarter
%attr(0755,root,root) %{_sbindir}/list_hooks.pl
%attr(0755,root,root) %{_sbindir}/logresolve.pl
%attr(0755,root,root) %{_sbindir}/log_server_status
%attr(0755,root,root) %{_sbindir}/rotatelogs
%attr(0755,root,root) %{_sbindir}/split-logfile
%attr(0755,root,root) %dir %{_libdir}/apache
%attr(0700,apache,root) %dir /var/cache/httpd
%exclude %{_mandir}/man8/htcacheclean.8*
%exclude %{_mandir}/man8/suexec.8*
%{_mandir}/*/*

%pre base
%sysusers_create_package apache %{SOURCE18}

#----------------------------------------------------------------------------

%package modules
Summary:	Meta package
Group:		System/Servers
Requires:	apache-mpm = %{EVRD}
Requires:	apache-mod_actions = %{EVRD}
Requires:	apache-mod_alias = %{EVRD}
Requires:	apache-mod_auth_basic = %{EVRD}
Requires:	apache-mod_auth_digest = %{EVRD}
Requires:	apache-mod_authn_anon = %{EVRD}
Requires:	apache-mod_authn_file = %{EVRD}
Requires:	apache-mod_authz_dbm = %{EVRD}
Requires:	apache-mod_authz_groupfile = %{EVRD}
Requires:	apache-mod_authz_host = %{EVRD}
Requires:	apache-mod_authz_owner = %{EVRD}
Requires:	apache-mod_authz_user = %{EVRD}
Requires:	apache-mod_autoindex = %{EVRD}
Requires:	apache-mod_cgi = %{EVRD}
Requires:	apache-mod_deflate = %{EVRD}
Requires:	apache-mod_dir = %{EVRD}
Requires:	apache-mod_env = %{EVRD}
Requires:	apache-mod_expires = %{EVRD}
Requires:	apache-mod_filter = %{EVRD}
Requires:	apache-mod_headers = %{EVRD}
Requires:	apache-mod_imagemap = %{EVRD}
Requires:	apache-mod_include = %{EVRD}
Requires:	apache-mod_info = %{EVRD}
Requires:	apache-mod_log_config = %{EVRD}
Requires:	apache-mod_lua = %{EVRD}
Requires:	apache-mod_mime = %{EVRD}
Requires:	apache-mod_mime_magic = %{EVRD}
Requires:	apache-mod_negotiation = %{EVRD}
Requires:	apache-mod_rewrite = %{EVRD}
Requires:	apache-mod_setenvif = %{EVRD}
Requires:	apache-mod_status = %{EVRD}
Requires:	apache-mod_substitute = %{EVRD}
Requires:	apache-mod_unique_id = %{EVRD}
Requires:	apache-mod_usertrack = %{EVRD}
Requires:	apache-mod_version = %{EVRD}
Requires:	apache-mod_vhost_alias = %{EVRD}
# new 2.3+ modules
Requires:	apache-mod_authz_core = %{EVRD}
Requires:	apache-mod_authz_host = %{EVRD}
Requires:	apache-mod_unixd = %{EVRD}
# new 2.4+ modules
Requires:	apache-mod_socache_redis = %{EVRD}

%description modules
This is a meta package that pulls in the apache modules used by default
in %{vendor}.

%files modules

#----------------------------------------------------------------------------

%package mod_authn_file
Summary:	User authentication using text files
Group:		System/Servers

%description mod_authn_file
This module provides authentication front-ends such as mod_auth_digest
and mod_auth_basic to authenticate users by looking up users in plain text
password files. Similar functionality is provided by mod_authn_dbm.

When using mod_auth_basic or mod_auth_digest, this module is invoked via
the AuthBasicProvider or AuthDigestProvider with the file value.

%files mod_authn_file
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/001_mod_authn_file.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authn_file.so

#----------------------------------------------------------------------------

%package mod_authn_dbm
Summary:	User authentication using DBM files
Group:		System/Servers

%description mod_authn_dbm
This module provides authentication front-ends such as mod_auth_digest and
mod_auth_basic to authenticate users by looking up users in dbm password
files. Similar functionality is provided by mod_authn_file.

When using mod_auth_basic or mod_auth_digest, this module is invoked via
the AuthBasicProvider or AuthDigestProvider with the dbm value.

%files mod_authn_dbm
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/002_mod_authn_dbm.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authn_dbm.so

#----------------------------------------------------------------------------

%package mod_authn_anon
Summary:	Allows "anonymous" user access to authenticated areas
Group:		System/Servers

%description mod_authn_anon
This module provides authentication front-ends such as mod_auth_basic to
authenticate users similar to anonymous-ftp sites, i.e. have a 'magic' user
id 'anonymous' and the email address as a password. These email addresses
can be logged.

Combined with other (database) access control methods, this allows for
effective user tracking and customization according to a user profile
while still keeping the site open for 'unregistered' users. One advantage
of using Auth-based user tracking is that, unlike magic-cookies and funny
URL pre/postfixes, it is completely browser independent and it allows users
to share URLs.

When using mod_auth_basic, this module is invoked via the AuthBasicProvider
directive with the anon value.

%files mod_authn_anon
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/003_mod_authn_anon.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authn_anon.so

#----------------------------------------------------------------------------

%package mod_authn_dbd
Summary:	User authentication using an SQL database
Group:		System/Servers
Requires:	apache-mod_dbd

%description mod_authn_dbd
This module provides authentication front-ends such as mod_auth_digest
and mod_auth_basic to authenticate users by looking up users in SQL
tables. Similar functionality is provided by, for example, mod_authn_file.

This module relies on mod_dbd to specify the backend database driver and
connection parameters, and manage the database connections.

When using mod_auth_basic or mod_auth_digest, this module is invoked via
the AuthBasicProvider or AuthDigestProvider with the dbd value.

%files mod_authn_dbd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/004_mod_authn_dbd.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authn_dbd.so

#----------------------------------------------------------------------------

%package mod_authn_socache
Summary:	Manages a cache of authentication credentials to relieve the load on backends
Group:		System/Servers

%description mod_authn_socache
Maintains a cache of authentication credentials, so that a new backend
lookup is not required for every authenticated request.

%files mod_authn_socache
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/005_mod_authn_socache.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authn_socache.so

#----------------------------------------------------------------------------

%package mod_authn_core
Summary:	Core Authentication
Group:		System/Servers

%description mod_authn_core
This module provides core authentication capabilities to allow or deny
access to portions of the web site. mod_authn_core provides directives that
are common to all authentication providers.

%files mod_authn_core
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/006_mod_authn_core.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authn_core.so

#----------------------------------------------------------------------------

%package mod_authz_host
Summary:	Group authorizations based on host (name or IP address)
Group:		System/Servers

%description mod_authz_host
The authorization providers implemented by mod_authz_host are registered using
the Require directive. The directive can be referenced within a <Directory>,
<Files>, or <Location> section as well as .htaccess files to control access
to particular parts of the server.  Access can be controlled based on the
client hostname or IP address.

In general, access restriction directives apply to all access methods (GET,
PUT, POST, etc). This is the desired behavior in most cases.  However, it is
possible to restrict some methods, while leaving other methods unrestricted,
by enclosing the directives in a <Limit> section.

%files mod_authz_host
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/007_mod_authz_host.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authz_host.so

#----------------------------------------------------------------------------

%package mod_authz_groupfile
Summary:	Group authorization using plaintext files
Group:		System/Servers

%description mod_authz_groupfile
This module provides authorization capabilities so that authenticated
users can be allowed or denied access to portions of the web site by group
membership. Similar functionality is provided by mod_authz_dbm.

%files mod_authz_groupfile
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/008_mod_authz_groupfile.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authz_groupfile.so

#----------------------------------------------------------------------------

%package mod_authz_user
Summary:	User Authorization
Group:		System/Servers

%description mod_authz_user
This module provides authorization capabilities so that authenticated
users can be allowed or denied access to portions of the web site.
mod_authz_user grants access if the authenticated user is listed in a
Require user directive. Alternatively Require valid-user can be used to
grant access to all successfully authenticated users.

%files mod_authz_user
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/009_mod_authz_user.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authz_user.so

#----------------------------------------------------------------------------

%package mod_authz_dbm
Summary:	Group authorization using DBM files
Group:		System/Servers

%description mod_authz_dbm
This module provides authorization capabilities so that authenticated
users can be allowed or denied access to portions of the web site by group
membership. Similar functionality is provided by mod_authz_groupfile.

%files mod_authz_dbm
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/010_mod_authz_dbm.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authz_dbm.so

#----------------------------------------------------------------------------

%package mod_authz_owner
Summary:	Authorization based on file ownership
Group:		System/Servers

%description mod_authz_owner
This module authorizes access to files by comparing the userid used for
HTTP authentication (the web userid) with the file-system owner or group
of the requested file. The supplied username and password must be already
properly verified by an authentication module, such as mod_auth_basic or
mod_auth_digest. mod_authz_owner recognizes two arguments for the Require
directive, file-owner and file-group, as follows:

file-owner
 The supplied web-username must match the system's name for the owner of the
 file being requested. That is, if the operating system says the requested
 file is owned by jones, then the username used to access it through the
 web must be jones as well.

file-group
 The name of the system group that owns the file must be present in a
 group database, which is provided, for example, by mod_authz_groupfile
 or mod_authz_dbm, and the web-username must be a member of that group. For
 example, if the operating system says the requested file is owned by (system)
 group accounts, the group accounts must appear in the group database and
 the web-username used in the request must be a member of that group.

%files mod_authz_owner
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/011_mod_authz_owner.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authz_owner.so

#----------------------------------------------------------------------------

%package mod_authz_dbd
Summary:	Group Authorization and Login using SQL
Group:		System/Servers

%description mod_authz_dbd
This module provides authorization capabilities so that authenticated
users can be allowed or denied access to portions of the web site by group
membership. Similar functionality is provided by mod_authz_groupfile and
mod_authz_dbm, with the exception that this module queries a SQL database
to determine whether a user is a member of a group.

This module can also provide database-backed user login/logout
capabilities. These are likely to be of most value when used in conjunction
with mod_authn_dbd.

This module relies on mod_dbd to specify the backend database driver and
connection parameters, and manage the database connections.

%files mod_authz_dbd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/012_mod_authz_dbd.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authz_dbd.so

#----------------------------------------------------------------------------

%package mod_authz_core
Summary:	Core Authorization
Group:		System/Servers

%description mod_authz_core
This module provides core authorization capabilities so that
authenticated users can be allowed or denied access to portions of the
web site. mod_authz_core provides the functionality to register various
authorization providers. It is usually used in conjunction with an
authentication provider module such as mod_authn_file and an authorization
module such as mod_authz_user. It also allows for advanced logic to be
applied to the authorization processing.

%files mod_authz_core
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/013_mod_authz_core.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authz_core.so

#----------------------------------------------------------------------------

%package mod_authnz_ldap
Summary:	LDAP HTTP Basic authentication
Group:		System/Servers

%description mod_authnz_ldap
This module provides authentication front-ends such as mod_auth_basic to
authenticate users through an ldap directory.

mod_authnz_ldap supports the following features:

* Known to support the OpenLDAP SDK (both 1.x and 2.x), Novell LDAP SDK and
  the iPlanet (Netscape) SDK.

* Complex authorization policies can be implemented by representing the policy
  with LDAP filters.

* Uses extensive caching of LDAP operations via mod_ldap.

* Support for LDAP over SSL (requires the Netscape SDK) or TLS (requires the
  OpenLDAP 2.x SDK or Novell LDAP SDK).

When using mod_auth_basic, this module is invoked via the AuthBasicProvider
directive with the ldap value.

%files mod_authnz_ldap
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/014_mod_authnz_ldap.conf
%attr(0755,root,root) %{_libdir}/apache/mod_authnz_ldap.so

#----------------------------------------------------------------------------

%package mod_access_compat
Summary:	Group authorizations based on host (name or IP address)
Group:		System/Servers

%description mod_access_compat
The directives provided by mod_access_compat are used in <Directory>,
<Files>, and <Location> sections as well as .htaccess files to control access
to particular parts of the server. Access can be controlled based on the
client hostname, IP address, or other characteristics of the client request,
as captured in environment variables. The Allow and Deny directives are
used to specify which clients are or are not allowed access to the server,
while the Order directive sets the default access state, and configures
how the Allow and Deny directives interact with each other.

Both host-based access restrictions and password-based authentication may
be implemented simultaneously. In that case, the Satisfy directive is used
to determine how the two sets of restrictions interact.

%files mod_access_compat
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/015_mod_access_compat.conf
%attr(0755,root,root) %{_libdir}/apache/mod_access_compat.so

#----------------------------------------------------------------------------

%package mod_auth_basic
Summary:	Basic authentication
Group:		System/Servers

%description mod_auth_basic
This module allows the use of HTTP Basic Authentication to restrict access
by looking up users in the given providers. HTTP Digest Authentication is
provided by mod_auth_digest. This module should usually be combined with at
least one authentication module such as mod_authn_file and one authorization
module such as mod_authz_user.

%files mod_auth_basic
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/016_mod_auth_basic.conf
%attr(0755,root,root) %{_libdir}/apache/mod_auth_basic.so

#----------------------------------------------------------------------------

%package mod_auth_form
Summary:	Form authentication
Group:		System/Servers

%description mod_auth_form
Form authentication depends on the mod_session modules, and these modules
make use of HTTP cookies, and as such can fall victim to Cross Site Scripting
attacks, or expose potentially private information to clients. Please ensure
that the relevant risks have been taken into account before enabling the
session functionality on your server.

This module allows the use of an HTML login form to restrict access by
looking up users in the given providers. HTML forms require significantly
more configuration than the alternatives, however an HTML login form can
provide a much friendlier experience for end users.

HTTP basic authentication is provided by mod_auth_basic, and HTTP digest
authentication is provided by mod_auth_digest. This module should be
combined with at least one authentication module such as mod_authn_file
and one authorization module such as mod_authz_user.

Once the user has been successfully authenticated, the user's login details
will be stored in a session provided by mod_session.

%files mod_auth_form
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/017_mod_auth_form.conf
%attr(0755,root,root) %{_libdir}/apache/mod_auth_form.so

#----------------------------------------------------------------------------

%package mod_auth_digest
Summary:	User authentication using MD5 Digest Authentication
Group:		System/Servers

%description mod_auth_digest
This module implements HTTP Digest Authentication (RFC2617), and provides
a more secure alternative to mod_auth_basic.

%files mod_auth_digest
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/018_mod_auth_digest.conf
%attr(0755,root,root) %{_libdir}/apache/mod_auth_digest.so

#----------------------------------------------------------------------------

%package mod_allowmethods
Summary:	Easily restrict what HTTP methods can be used on the server
Group:		System/Servers

%description mod_allowmethods
This module makes it easy to restrict what HTTP methods can used on an
server. The most common configuration would be:

%files mod_allowmethods
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/019_mod_allowmethods.conf
%attr(0755,root,root) %{_libdir}/apache/mod_allowmethods.so

#----------------------------------------------------------------------------

%package mod_file_cache
Summary:	Caches a static list of files in memory
Group:		System/Servers

%description mod_file_cache
This module should be used with care. You can easily create a broken site
using mod_file_cache, so read this document carefully.

Caching frequently requested files that change very infrequently is a
technique for reducing server load. mod_file_cache provides two techniques for
caching frequently requested static files. Through configuration directives,
you can direct mod_file_cache to either open then mmap() a file, or to
pre-open a file and save the file's open file handle. Both techniques reduce
server load when processing requests for these files by doing part of the
work (specifically, the file I/O) for serving the file when the server is
started rather than during each request.

Notice: You cannot use this for speeding up CGI programs or other files
which are served by special content handlers. It can only be used for
regular files which are usually served by the Apache core content handler.

This module is an extension of and borrows heavily from the mod_mmap_static
module in Apache 1.3.

%files mod_file_cache
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/020_mod_file_cache.conf
%attr(0755,root,root) %{_libdir}/apache/mod_file_cache.so

#----------------------------------------------------------------------------

%package mod_cache
Summary:	RFC 2616 compliant HTTP caching filter
Group:		System/Servers
Recommends:	apache-mod_cache_disk

%description mod_cache
This module should be used with care, as when the CacheQuickHandler
directive is in its default value of on, the Allow and Deny directives
will be circumvented. You should not enable quick handler caching for any
content to which you wish to limit access by client host name, address or
environment variable.

mod_cache implements an RFC 2616 compliant HTTP content caching filter,
with support for the caching of content negotiated responses containing
the Vary header.

RFC 2616 compliant caching provides a mechanism to verify whether stale or
expired content is still fresh, and can represent a significant performance
boost when the origin server supports conditional requests by honouring
the If-None-Match HTTP request header. Content is only regenerated from
scratch when the content has changed, and not when the cached entry expires.

As a filter, mod_cache can be placed in front of content originating from
any handler, including flat files (served from a slow disk cached on a fast
disk), the output of a CGI script or dynamic content generator, or content
proxied from another server.

In the default configuration, mod_cache inserts the caching filter as far
forward as possible within the filter stack, utilising the quick handler to
bypass all per request processing when returning content to the client. In
this mode of operation, mod_cache may be thought of as a caching proxy
server bolted to the front of the webserver, while running within the
webserver itself.

When the quick handler is switched off using the CacheQuickHandler directive,
it becomes possible to insert the CACHE filter at a point in the filter
stack chosen by the administrator. This provides the opportunity to cache
content before that content is personalised by the mod_include filter,
or optionally compressed by the mod_deflate filter.

Under normal operation, mod_cache will respond to and can be controlled by
the Cache-Control and Pragma headers sent from a client in a request, or from
a server within a response. Under exceptional circumstances, mod_cache can
be configured to override these headers and force site specific behaviour,
however such behaviour will be limited to this cache only, and will not
affect the operation of other caches that may exist between the client and
server, and as a result is not recommended unless strictly necessary.

RFC 2616 allows for the cache to return stale data while the existing
stale entry is refreshed from the origin server, and this is supported
by mod_cache when the CacheLock directive is suitably configured. Such
responses will contain a Warning HTTP header with a 110 response code.
RFC 2616 also allows a cache to return stale data when the attempt made to
refresh the stale data returns an error 500 or above, and this behaviour
is supported by default by mod_cache. Such responses will contain a Warning
HTTP header with a 111 response code.

mod_cache requires the services of one or more storage management modules. One
storage management module is included in the base Apache distribution:

mod_cache_disk
 Implements a disk based storage manager. Headers and bodies are stored
 separately on disk, in a directory structure derived from the md5 hash of the
 cached URL. Multiple content negotiated responses can be stored concurrently,
 however the caching of partial content is not supported by this module. The
 htcacheclean tool is provided to list cached URLs, remove cached URLs,
 or to maintain the size of the disk cache within size and inode limits.

Further details, discussion, and examples, are provided in the Caching Guide.

%files mod_cache
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/021_mod_cache.conf
%attr(0755,root,root) %{_libdir}/apache/mod_cache.so

#----------------------------------------------------------------------------

%package mod_cache_disk
Summary:	Disk based storage module for the HTTP caching filter
Group:		System/Servers
Recommends:	apache-htcacheclean = %{EVRD}

%description mod_cache_disk
mod_cache_disk implements a disk based storage manager for mod_cache.

The headers and bodies of cached responses are stored separately on disk,
in a directory structure derived from the md5 hash of the cached URL.

Multiple content negotiated responses can be stored concurrently, however
the caching of partial content is not yet supported by this module.

Atomic cache updates to both header and body files are achieved without
the need for locking by storing the device and inode numbers of the body
file within the header file. This has the side effect that cache entries
manually moved into the cache will be ignored.

The htcacheclean tool is provided to list cached URLs, remove cached URLs,
or to maintain the size of the disk cache within size and/or inode limits. The
tool can be run on demand, or can be daemonized to offer continuous monitoring
of directory sizes.

%files mod_cache_disk
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/022_mod_cache_disk.conf
%attr(0755,root,root) %{_libdir}/apache/mod_cache_disk.so

#----------------------------------------------------------------------------

%package mod_cache_socache
Summary:	Shared Object cache module for HTTPD
Group:		System/Servers

%description mod_cache_socache
mod_cache_socache implements a shared object cache (socache) based storage
manager for mod_cache.

The headers and bodies of cached responses are combined, and stored underneath
a single key in the shared object cache. A number of implementations of shared
object caches are available to choose from.

Multiple content negotiated responses can be stored concurrently, however the
caching of partial content is not yet supported by this module.

%files mod_cache_socache
%attr(0755,root,root) %{_libdir}/apache/mod_cache_socache.so

#----------------------------------------------------------------------------

%package mod_socache_shmcb
Summary:	shmcb based shared object cache provider
Group:		System/Servers

%description mod_socache_shmcb
mod_socache_shmcb is a shared object cache provider which provides for
creation and access to a cache backed by a high-performance cyclic buffer
inside a shared memory segment.

shmcb:/path/to/datafile(512000)

Details of other shared object cache providers can be found here.

%files mod_socache_shmcb
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/023_mod_socache_shmcb.conf
%attr(0755,root,root) %{_libdir}/apache/mod_socache_shmcb.so

#----------------------------------------------------------------------------

%package mod_socache_dbm
Summary:	DBM based shared object cache provider
Group:		System/Servers

%description mod_socache_dbm
mod_socache_dbm is a shared object cache provider which provides for creation
and access to a cache backed by a DBM database.

dbm:/path/to/datafile

Details of other shared object cache providers can be found here.

%files mod_socache_dbm
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/024_mod_socache_dbm.conf
%attr(0755,root,root) %{_libdir}/apache/mod_socache_dbm.so

#----------------------------------------------------------------------------

%package mod_socache_memcache
Summary:	Memcache based shared object cache provider
Group:		System/Servers

%description mod_socache_memcache
mod_socache_memcache is a shared object cache provider which provides for
creation and access to a cache backed by the memcached high-performance,
distributed memory object caching system.

Details of other shared object cache providers can be found here.

%files mod_socache_memcache
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/025_mod_socache_memcache.conf
%attr(0755,root,root) %{_libdir}/apache/mod_socache_memcache.so

#----------------------------------------------------------------------------

%package mod_socache_redis
Summary:	Redis based shared object cache provider
Group:		System/Servers

%description mod_socache_redis
mod_socache_redis is a shared object cache provider which provides 
for creation and access to a cache backed by the Redis 
high-performance, distributed memory object caching system.

This shared object cache provider's "create" method requires a comma 
separated list of memcached host/port specifications. If using this 
provider via another modules configuration (such as SSLSessionCache),
provide the list of servers as the optional "arg" parameter.

%files mod_socache_redis
%attr(0755,root,root) %{_libdir}/apache/mod_socache_redis.so

#----------------------------------------------------------------------------

%package mod_watchdog
Summary:	provides infrastructure for other modules to periodically run tasks
Group:		System/Servers

%description mod_watchdog
mod_watchdog defines programmatic hooks for other modules to periodically run
tasks. These modules can register handlers for mod_watchdog hooks. Currently,
the following modules in the Apache distribution use this functionality:

 * mod_heartbeat

 * mod_heartmonitor

To allow a module to use mod_watchdog functionality, mod_watchdog itself
must be statically linked to the server core or, if a dynamic module,
be loaded before the calling module.

%files mod_watchdog
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/026_mod_watchdog.conf
%attr(0755,root,root) %{_libdir}/apache/mod_watchdog.so

#----------------------------------------------------------------------------

%package mod_dbd
Summary:	Manages SQL database connections
Group:		System/Servers
Requires:	apr-util-dbd-ldap
Recommends:	apr-util-dbd-freetds
Recommends:	apr-util-dbd-mysql
Recommends:	apr-util-dbd-odbc
Recommends:	apr-util-dbd-pgsql
Recommends:	apr-util-dbd-sqlite3

%description mod_dbd
mod_dbd manages SQL database connections using APR. It provides database
connections on request to modules requiring SQL database functions, and
takes care of managing databases with optimal efficiency and scalability
for both threaded and non-threaded MPMs. For details, see the APR website
and this overview of the Apache DBD Framework by its original developer.

%files mod_dbd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/027_mod_dbd.conf
%attr(0755,root,root) %{_libdir}/apache/mod_dbd.so

#----------------------------------------------------------------------------

%package mod_bucketeer
Summary:	Buckets manipulation filter
Group:		System/Servers

%description mod_bucketeer
Buckets manipulation filter.

%files mod_bucketeer
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/028_mod_bucketeer.conf
%attr(0755,root,root) %{_libdir}/apache/mod_bucketeer.so

#----------------------------------------------------------------------------

%package mod_dumpio
Summary:	Dumps all I/O to error log as desired
Group:		System/Servers

%description mod_dumpio
mod_dumpio allows for the logging of all input received by Apache and/or
all output sent by Apache to be logged (dumped) to the error.log file.

The data logging is done right after SSL decoding (for input) and right
before SSL encoding (for output). As can be expected, this can produce
extreme volumes of data, and should only be used when debugging problems.

%files mod_dumpio
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/029_mod_dumpio.conf
%attr(0755,root,root) %{_libdir}/apache/mod_dumpio.so

#----------------------------------------------------------------------------

%package mod_echo
Summary:	A simple echo server to illustrate protocol modules
Group:		System/Servers

%description mod_echo
This module provides an example protocol module to illustrate the concept. It
provides a simple echo server. Telnet to it and type stuff, and it will
echo it.

%files mod_echo
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/030_mod_echo.conf
%attr(0755,root,root) %{_libdir}/apache/mod_echo.so

#----------------------------------------------------------------------------

%package mod_case_filter
Summary:	CaseFilter module
Group:		System/Servers

%description mod_case_filter
CaseFilter module.

%files mod_case_filter
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/031_mod_case_filter.conf
%attr(0755,root,root) %{_libdir}/apache/mod_case_filter.so

#----------------------------------------------------------------------------

%package mod_case_filter_in
Summary:	CaseFilterInFilter module
Group:		System/Servers

%description mod_case_filter_in
CaseFilterInFilter module.

%files mod_case_filter_in
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/032_mod_case_filter_in.conf
%attr(0755,root,root) %{_libdir}/apache/mod_case_filter_in.so

#----------------------------------------------------------------------------

%package mod_buffer
Summary:	Support for request buffering
Group:		System/Servers

%description mod_buffer
This module provides the ability to buffer the input and output filter stacks.

Under certain circumstances, content generators might create content in small
chunks. In order to promote memory reuse, in memory chunks are always 8k in
size, regardless of the size of the chunk itself. When many small chunks are
generated by a request, this can create a large memory footprint while the
request is being processed, and an unnecessarily large amount of data on
the wire. The addition of a buffer collapses the response into the fewest
chunks possible.

When httpd is used in front of an expensive content generator, buffering the
response may allow the backend to complete processing and release resources
sooner, depending on how the backend is designed.

The buffer filter may be added to either the input or the output filter
stacks, as appropriate, using the SetInputFilter, SetOutputFilter,
AddOutputFilter or AddOutputFilterByType directives.

Using buffer with mod_include

AddOutputFilterByType INCLUDES;BUFFER text/html The buffer filters read the
request/response into RAM and then repack the request/response into the fewest
memory buckets possible, at the cost of CPU time. When the request/response
is already efficiently packed, buffering the request/response could cause
the request/response to be slower than not using a buffer at all. These
filters should be used with care, and only where necessary.

%files mod_buffer
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/033_mod_buffer.conf
%attr(0755,root,root) %{_libdir}/apache/mod_buffer.so

#----------------------------------------------------------------------------

%package mod_data
Summary:	Convert response body into an RFC2397 data URL
Group:		System/Servers

%description mod_data
This module provides the ability to convert a response into an RFC2397
data URL.

Data URLs can be embedded inline within web pages using something like
the mod_include module, to remove the need for clients to make separate
connections to fetch what may potentially be many small images. Data URLs
may also be included into pages generated by scripting languages such as PHP.

An example of a data URL

data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw
AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz
ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp
a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl
ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis
F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH
hhx4dbgYKAAA7

The filter takes no parameters, and can be added to the filter stack using
the SetOutputFilter directive, or any of the directives supported by the
mod_filter module.

Configuring the filter

<Location /data/images>
SetOutputFilter DATA </Location>

%files mod_data
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/034_mod_data.conf
%attr(0755,root,root) %{_libdir}/apache/mod_data.so

#----------------------------------------------------------------------------

%package mod_ratelimit
Summary:	Bandwidth Rate Limiting for Clients
Group:		System/Servers

%description mod_ratelimit
Provides a filter named RATE_LIMIT to limit client bandwidth. The connection
speed to be simulated is specified, in KiB/s, using the environment variable
rate-limit.

%files mod_ratelimit
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/035_mod_ratelimit.conf
%attr(0755,root,root) %{_libdir}/apache/mod_ratelimit.so

#----------------------------------------------------------------------------

%package mod_reqtimeout
Summary:	Set timeout and minimum data rate for receiving requests
Group:		System/Servers

%description mod_reqtimeout
This module allows to set timeouts for the reading request and reading body
phases. It is implemented as an input connection filter that sets the socket
timeout so that the total request time does not exceed the timeout value.

mod_reqtimeout can be used to mitigate slowloris type attacks.

%files mod_reqtimeout
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/036_mod_reqtimeout.conf
%attr(0755,root,root) %{_libdir}/apache/mod_reqtimeout.so

#----------------------------------------------------------------------------

%package mod_ext_filter
Summary:	Pass the response body through an external program before delivery
Group:		System/Servers

%description mod_ext_filter
mod_ext_filter presents a simple and familiar programming model for
filters. With this module, a program which reads from stdin and writes to
stdout (i.e., a Unix-style filter command) can be a filter for Apache. This
filtering mechanism is much slower than using a filter which is specially
written for the Apache API and runs inside of the Apache server process,
but it does have the following benefits: * the programming model is much
simpler * any programming/scripting language can be used, provided that it
 allows the program to read from standard input and write to standard output
* existing programs can be used unmodified as Apache filters

Even when the performance characteristics are not suitable for production
use, mod_ext_filter can be used as a prototype environment for filters.

%files mod_ext_filter
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/037_mod_ext_filter.conf
%attr(0755,root,root) %{_libdir}/apache/mod_ext_filter.so

#----------------------------------------------------------------------------

%package mod_request
Summary:	Filters to handle and make available HTTP request bodies
Group:		System/Servers

%description mod_request
Under normal circumstances, request handlers such as the default handler
for static files will discard the request body when it is not needed by
the request handler. As a result, filters such as mod_include are limited
to making GET requests only when including other URLs as subrequests, even
if the original request was a POST request, as the discarded request body
is no longer available once filter processing is taking place.

When this directive has a value greater than zero, request handlers that
would otherwise discard request bodies will instead set the request body
aside for use by filters up to the maximum size specified. In the case of the
mod_include filter, an attempt to POST a request to the static shtml file will
cause any subrequests to be POST requests, instead of GET requests as before.

This feature makes it possible to break up complex web pages and web
applications into small individual components, and combine the components
and the surrounding web page structure together using mod_include. The
components can take the form of CGI programs, scripted languages, or URLs
reverse proxied into the URL space from another server using mod_proxy.

Note: Each request set aside has to be set aside in temporary RAM until the
request is complete. As a result, care should be taken to ensure sufficient
RAM is available on the server to support the intended load. Use of this
directive should be limited to where needed on targeted parts of your URL
space, and with the lowest possible value that is still big enough to hold
a request body.

If the request size sent by the client exceeds the maximum size allocated
by this directive, the server will return 413 Request Entity Too Large.

%files mod_request
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/038_mod_request.conf
%attr(0755,root,root) %{_libdir}/apache/mod_request.so

#----------------------------------------------------------------------------

%package mod_include
Summary:	Server-parsed html documents (Server Side Includes)
Group:		System/Servers

%description mod_include
This module provides a filter which will process files before they are
sent to the client. The processing is controlled by specially formatted
SGML comments, referred to as elements. These elements allow conditional
text, the inclusion of other files or programs, as well as the setting and
printing of environment variables.

%files mod_include
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/039_mod_include.conf
%attr(0755,root,root) %{_libdir}/apache/mod_include.so

#----------------------------------------------------------------------------

%package mod_filter
Summary:	Context-sensitive smart filter configuration module
Group:		System/Servers

%description mod_filter
This module enables smart, context-sensitive configuration of output
content filters. For example, apache can be configured to process different
content-types through different filters, even when the content-type is not
known in advance (e.g. in a proxy).

mod_filter works by introducing indirection into the filter chain.  Instead of
inserting filters in the chain, we insert a filter harness which in turn
dispatches conditionally to a filter provider. Any content filter may be
used as a provider to mod_filter; no change to existing filter modules is
required (although it may be possible to simplify them).

%files mod_filter
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/040_mod_filter.conf
%attr(0755,root,root) %{_libdir}/apache/mod_filter.so

#----------------------------------------------------------------------------

%package mod_reflector
Summary:	Reflect a request body as a response via the output filter stack
Group:		System/Servers

%description mod_reflector
This module allows request bodies to be reflected back to the client,
in the process passing the request through the output filter stack. A
suitably configured chain of filters can be used to transform the request
into a response. This module can be used to turn an output filter into an
HTTP service.

%files mod_reflector
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/041_mod_reflector.conf
%attr(0755,root,root) %{_libdir}/apache/mod_reflector.so

#----------------------------------------------------------------------------

%package mod_substitute
Summary:	Perform search and replace operations on response bodies
Group:		System/Servers

%description mod_substitute
mod_substitute provides a mechanism to perform both regular expression and
fixed string substitutions on response bodies.

%files mod_substitute
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/042_mod_substitute.conf
%attr(0755,root,root) %{_libdir}/apache/mod_substitute.so

#----------------------------------------------------------------------------

%package mod_sed
Summary:	Filter Input (request) and Output (response) content using sed syntax
Group:		System/Servers

%description mod_sed
mod_sed is an in-process content filter. The mod_sed filter implements the
sed editing commands implemented by the Solaris 10 sed program as described
in the manual page. However, unlike sed, mod_sed doesn't take data from
standard input. Instead, the filter acts on the entity data sent between
client and server. mod_sed can be used as an input or output filter. mod_sed
is a content filter, which means that it cannot be used to modify client
or server http headers.

The mod_sed output filter accepts a chunk of data, executes the sed scripts
on the data, and generates the output which is passed to the next filter
in the chain.

The mod_sed input filter reads the data from the next filter in the chain,
executes the sed scripts, and returns the generated data to the caller
filter in the filter chain.

Both the input and output filters only process the data if newline characters
are seen in the content. At the end of the data, the rest of the data is
treated as the last line.

A tutorial article on mod_sed, and why it is more powerful than simple string
or regular expression search and replace, is available on the author's blog.

%files mod_sed
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/043_mod_sed.conf
%attr(0755,root,root) %{_libdir}/apache/mod_sed.so

#----------------------------------------------------------------------------

%package mod_charset_lite
Summary:	Specify character set translation or recoding
Group:		System/Servers

%description mod_charset_lite
mod_charset_lite allows the server to change the character set of responses
before sending them to the client. In an EBCDIC environment, Apache always
translates HTTP protocol content (e.g. response headers) from the code page of
the Apache process locale to ISO-8859-1, but not the body of responses. In
any environment, mod_charset_lite can be used to specify that response
bodies should be translated. For example, if files are stored in EBCDIC,
then mod_charset_lite can translate them to ISO-8859-1 before sending them
to the client.

This module provides a small subset of configuration mechanisms implemented
by Russian Apache and its associated mod_charset.

%files mod_charset_lite
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/044_mod_charset_lite.conf
%attr(0755,root,root) %{_libdir}/apache/mod_charset_lite.so

#----------------------------------------------------------------------------

%package mod_deflate
Summary:	Compress content before it is delivered to the client
Group:		System/Servers

%description mod_deflate
The mod_deflate module provides the DEFLATE output filter that allows
output from your server to be compressed before being sent to the client
over the network.

%files mod_deflate
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/045_mod_deflate.conf
%attr(0755,root,root) %{_libdir}/apache/mod_deflate.so

#----------------------------------------------------------------------------

%package mod_macro
Summary:	Macro support inside Apache httpd runtime configuration files
Group:		System/Servers
Epoch:		2

%description mod_macro
This modules provides macros within apache httpd runtime configuration files.
These macros may have parameters. They are expanded when used (parameters
are substituted by their values given as an argument), and the result is
processed normally.

%files mod_macro
%attr(0755,root,root) %{_libdir}/apache/mod_macro.so

#----------------------------------------------------------------------------

%package mod_xml2enc
Summary:	Enhanced charset/internationalisation support for libxml2-based filter modules
Group:		System/Servers

%description mod_xml2enc
This module provides enhanced internationalisation support for markup-aware
filter modules such as mod_proxy_html. It can automatically detect the
encoding of input data and ensure they are correctly processed by the
libxml2 parser, including converting to Unicode (UTF-8) where necessary. It
can also convert data to an encoding of choice after markup processing, and
will ensure the correct charset value is set in the HTTP Content-Type header.

%files mod_xml2enc
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/046_mod_xml2enc.conf
%attr(0755,root,root) %{_libdir}/apache/mod_xml2enc.so

#----------------------------------------------------------------------------

%package mod_proxy_html
Summary:	Rewrite HTML links in to ensure they are addressable in a proxy context
Group:		System/Servers
Epoch:		1

%description mod_proxy_html
This module provides an output filter to rewrite HTML links in a proxy
situation, to ensure that links work for users outside the proxy. It serves
the same purpose as Apache's ProxyPassReverse directive does for HTTP headers,
and is an essential component of a reverse proxy.

For example, if a company has an application server at appserver.example.com
that is only visible from within the company's internal network, and a
public webserver www.example.com, they may wish to provide a gateway to
the application server at http://www.example.com/appserver/. When the
application server links to itself, those links need to be rewritten
to work through the gateway.  mod_proxy_html serves to rewrite <a
href="http://appserver.example.com/foo/bar.html">foobar</a> to <a
href="http://www.example.com/appserver/foo/bar.html">foobar</a> making it
accessible from outside.

mod_proxy_html was originally developed at WebÞing, whose extensive
documentation may be useful to users.

%files mod_proxy_html
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/047_mod_proxy_html.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_html.so

#----------------------------------------------------------------------------

%package mod_proxy_uwsgi
Summary:	uWSGI - Apache2 proxy module
Group:		System/Servers

%description mod_proxy_uwsgi
Fully Apache API compliant proxy module

%files mod_proxy_uwsgi
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_uwsgi.so

#----------------------------------------------------------------------------

%package mod_proxy_wstunnel
Summary:	WebSockets support for mod_proxy
Group:		System/Servers

%description mod_proxy_wstunnel
This module requires the service of mod_proxy. It provides support
for the tunnelling of web socket connections to a backend websockets
server. The connection is automagically upgraded to a websocket
connection.

%files mod_proxy_wstunnel
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_wstunnel.so

#----------------------------------------------------------------------------

%package mod_mime
Summary:	Associates the requested filename's extensions with the
Group:		System/Servers

%description mod_mime
This module is used to assign content metadata to the content selected
for an HTTP response by mapping patterns in the URI or filenames to the
metadata values. For example, the filename extensions of content files
often define the content's Internet media type, language, character set,
and content-encoding. This information is sent in HTTP messages containing
that content and used in content negotiation when selecting alternatives,
such that the user's preferences are respected when choosing one of several
possible contents to serve. See mod_negotiation for more information about
content negotiation.

The directives AddCharset, AddEncoding, AddLanguage and AddType are all used
to map file extensions onto the metadata for that file.  Respectively they
set the character set, content-encoding, content-language, and media-type
(content-type) of documents. The directive TypesConfig is used to specify
a file which also maps extensions onto media types.

In addition, mod_mime may define the handler and filters that originate
and process content. The directives AddHandler, AddOutputFilter, and
AddInputFilter control the modules or scripts that serve the document.
The MultiviewsMatch directive allows mod_negotiation to consider these file
extensions to be included when testing Multiviews matches.

While mod_mime associates metadata with filename extensions, the core
server provides directives that are used to associate all the files in a
given container (e.g., <Location>, <Directory>, or <Files>) with particular
metadata. These directives include ForceType, SetHandler, SetInputFilter,
and SetOutputFilter. The core directives override any filename extension
mappings defined in mod_mime.

Note that changing the metadata for a file does not change the value of the
Last-Modified header. Thus, previously cached copies may still be used by
a client or proxy, with the previous headers. If you change the metadata
(language, content type, character set or encoding) you may need to 'touch'
affected files (updating their last modified date) to ensure that all
visitors are receive the corrected content headers.

%files mod_mime
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/048_mod_mime.conf
%attr(0755,root,root) %{_libdir}/apache/mod_mime.so

#----------------------------------------------------------------------------

%package mod_ldap
Summary:	LDAP connection pooling and result caching services
Group:		System/Servers
Requires:	apr-util-dbd-ldap
Requires:	apache-mod_authnz_ldap
Requires(post): rpm-helper
%if %{mdvver} >= 201905
Requires(pre):	user(apache)
%endif

%description mod_ldap
This module was created to improve the performance of websites relying on
backend connections to LDAP servers. In addition to the functions provided
by the standard LDAP libraries, this module adds an LDAP connection pool
and an LDAP shared memory cache.

To enable this module, LDAP support must be compiled into apr-util.
This is achieved by adding the --with-ldap flag to the configure script
when building Apache.

SSL/TLS support is dependant on which LDAP toolkit has been linked to
APR. As of this writing, APR-util supports: OpenLDAP SDK (2.x or later),
Novell LDAP SDK, Mozilla LDAP SDK, native Solaris LDAP SDK (Mozilla based),
native Microsoft LDAP SDK, or the iPlanet (Netscape) SDK. See the APR
website for details.

%files mod_ldap
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/049_mod_ldap.conf
%attr(0755,root,root) %{_libdir}/apache/mod_ldap.so
%attr(0600,apache,root) %ghost /var/cache/httpd/mod_ldap_cache

%post mod_ldap
%create_ghostfile /var/cache/httpd/mod_ldap_cache apache root 0600

#----------------------------------------------------------------------------

%package mod_log_config
Summary:	Logging of the requests made to the server
Group:		System/Servers

%description mod_log_config
This module provides for flexible logging of client requests. Logs are
written in a customizable format, and may be written directly to a file, or
to an external program. Conditional logging is provided so that individual
requests may be included or excluded from the logs based on characteristics
of the request.

Three directives are provided by this module: TransferLog to create a log
file, LogFormat to set a custom format, and CustomLog to define a log file
and format in one step. The TransferLog and CustomLog directives can be
used multiple times in each server to cause each request to be logged to
multiple files.

%files mod_log_config
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/050_mod_log_config.conf
%attr(0755,root,root) %{_libdir}/apache/mod_log_config.so

#----------------------------------------------------------------------------

%package mod_log_debug
Summary:	Additional configurable debug logging
Group:		System/Servers

%description mod_log_debug
Additional configurable debug logging.

%files mod_log_debug
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/051_mod_log_debug.conf
%attr(0755,root,root) %{_libdir}/apache/mod_log_debug.so

#----------------------------------------------------------------------------

%package mod_log_forensic
Summary:	Forensic Logging of the requests made to the server
Group:		System/Servers

%description mod_log_forensic
This module provides for forensic logging of client requests. Logging is
done before and after processing a request, so the forensic log contains
two log lines for each request. The forensic logger is very strict, which
means: * The format is fixed. You cannot modify the logging format at
 runtime.
* If it cannot write its data, the child process exits immediately
 and may dump core (depending on your CoreDumpDirectory configuration).

The check_forensic script, which can be found in the distribution's support
directory, may be helpful in evaluating the forensic log output.

%files mod_log_forensic
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/052_mod_log_forensic.conf
%attr(0755,root,root) %{_libdir}/apache/mod_log_forensic.so

#----------------------------------------------------------------------------

%package mod_logio
Summary:	Logging of input and output bytes per request
Group:		System/Servers

%description mod_logio
This module provides the logging of input and output number of bytes
received/sent per request. The numbers reflect the actual bytes as received
on the network, which then takes into account the headers and bodies of
requests and responses. The counting is done before SSL/TLS on input and
after SSL/TLS on output, so the numbers will correctly reflect any changes
made by encryption.

This module requires mod_log_config.  When KeepAlive connections are used with
SSL, the overhead of the SSL handshake is reflected in the byte count of the
first request on the connection. When per-directory SSL renegotiation occurs,
the bytes are associated with the request that triggered the renegotiation.

%files mod_logio
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/053_mod_logio.conf
%attr(0755,root,root) %{_libdir}/apache/mod_logio.so

#----------------------------------------------------------------------------

%package mod_lua
Summary:	Provides Lua hooks into various portions of the httpd request processing
Group:		System/Servers

%description mod_lua
This module allows the server to be extended with scripts written in the Lua
programming language. The extension points (hooks) available with mod_lua
include many of the hooks available to natively compiled Apache HTTP Server
modules, such as mapping requests to files, generating dynamic responses,
access control, authentication, and authorization

More information on the Lua programming language can be found at the the Lua
website.  mod_lua is still in experimental state. Until it is declared stable,
usage and behavior may change at any time, even between stable releases of
the 2.4.x series. Be sure to check the CHANGES file before upgrading.

%files mod_lua
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/054_mod_lua.conf
%attr(0755,root,root) %{_libdir}/apache/mod_lua.so

#----------------------------------------------------------------------------

%package mod_env
Summary:	Modifies the environment which is passed to CGI scripts and SSI pages
Group:		System/Servers

%description mod_env
This module allows for control of internal environment variables that are
used by various Apache HTTP Server modules. These variables are also provided
to CGI scripts as native system environment variables, and available for
use in SSI pages. Environment variables may be passed from the shell which
invoked the httpd process. Alternatively, environment variables may be set
or unset within the configuration process.

%files mod_env
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/055_mod_env.conf
%attr(0755,root,root) %{_libdir}/apache/mod_env.so

#----------------------------------------------------------------------------

%package mod_mime_magic
Summary:	Determines the MIME type of a file by looking at a few bytes of its contents
Group:		System/Servers

%description mod_mime_magic
This module determines the MIME type of files in the same way the Unix
file(1) command works: it looks at the first few bytes of the file. It is
intended as a "second line of defense" for cases that mod_mime can't resolve.

This module is derived from a free version of the file(1) command for Unix,
which uses "magic numbers" and other hints from a file's contents to figure
out what the contents are. This module is active only if the magic file is
specified by the MimeMagicFile directive.

%files mod_mime_magic
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/056_mod_mime_magic.conf
%attr(0755,root,root) %{_libdir}/apache/mod_mime_magic.so

#----------------------------------------------------------------------------

%package mod_cern_meta
Summary:	CERN httpd metafile semantics
Group:		System/Servers

%description mod_cern_meta
Emulate the CERN HTTPD Meta file semantics. Meta files are HTTP headers
that can be output in addition to the normal range of headers for each
file accessed. They appear rather like the Apache .asis files, and are
able to provide a crude way of influencing the Expires: header, as well as
providing other curiosities. There are many ways to manage meta information,
this one was chosen because there is already a large number of CERN users
who can exploit this module.

More information on the CERN metafile semantics is available.

%files mod_cern_meta
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/057_mod_cern_meta.conf
%attr(0755,root,root) %{_libdir}/apache/mod_cern_meta.so

#----------------------------------------------------------------------------

%package mod_expires
Summary:	Generation of Expires and Cache-Control HTTP headers
Group:		System/Servers

%description mod_expires
This module controls the setting of the Expires HTTP header and the
max-age directive of the Cache-Control HTTP header in server responses.
The expiration date can set to be relative to either the time the source
file was last modified, or to the time of the client access.

These HTTP headers are an instruction to the client about the document's
validity and persistence. If cached, the document may be fetched from the
cache rather than from the source until this time has passed. After that,
the cache copy is considered "expired" and invalid, and a new copy must be
obtained from the source.

To modify Cache-Control directives other than max-age (see RFC 2616 section
14.9), you can use the Header directive.

When the Expires header is already part of the response generated by the
server, for example when generated by a CGI script or proxied from an origin
server, this module does not change or add an Expires or Cache-Control header.

%files mod_expires
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/058_mod_expires.conf
%attr(0755,root,root) %{_libdir}/apache/mod_expires.so

#----------------------------------------------------------------------------

%package mod_headers
Summary:	Customization of HTTP request and response headers
Group:		System/Servers

%description mod_headers
This module provides directives to control and modify HTTP request and
response headers. Headers can be merged, replaced or removed.

%files mod_headers
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/059_mod_headers.conf
%attr(0755,root,root) %{_libdir}/apache/mod_headers.so

#----------------------------------------------------------------------------

%package mod_ident
Summary:	RFC 1413 ident lookups
Group:		System/Servers

%description mod_ident
This module queries an RFC 1413 compatible daemon on a remote host to look
up the owner of a connection.

%files mod_ident
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/060_mod_ident.conf
%attr(0755,root,root) %{_libdir}/apache/mod_ident.so

#----------------------------------------------------------------------------

%package mod_usertrack
Summary:	Clickstream logging of user activity on a site
Group:		System/Servers

%description mod_usertrack
Provides tracking of a user through your website via browser cookies.

%files mod_usertrack
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/061_mod_usertrack.conf
%attr(0755,root,root) %{_libdir}/apache/mod_usertrack.so

#----------------------------------------------------------------------------

%package mod_unique_id
Summary:	Provides an environment variable with a unique identifier for each request
Group:		System/Servers

%description mod_unique_id
This module provides a magic token for each request which is guaranteed
to be unique across "all" requests under very specific conditions. The
unique identifier is even unique across multiple machines in a properly
configured cluster of machines. The environment variable UNIQUE_ID is set to
the identifier for each request. Unique identifiers are useful for various
reasons which are beyond the scope of this document.

%files mod_unique_id
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/062_mod_unique_id.conf
%attr(0755,root,root) %{_libdir}/apache/mod_unique_id.so

#----------------------------------------------------------------------------

%package mod_setenvif
Summary:	Set the environment variables based on characteristics of the request
Group:		System/Servers

%description mod_setenvif
The mod_setenvif module allows you to set internal environment variables
according to whether different aspects of the request match regular
expressions you specify. These environment variables can be used by other
parts of the server to make decisions about actions to be taken, as well
as becoming available to CGI scripts and SSI pages.

The directives are considered in the order they appear in the configuration
files. So more complex sequences can be used, such as this example, which
sets netscape if the browser is mozilla but not MSIE.

BrowserMatch ^Mozilla netscape BrowserMatch MSIE !netscape

%files mod_setenvif
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/063_mod_setenvif.conf
%attr(0755,root,root) %{_libdir}/apache/mod_setenvif.so

#----------------------------------------------------------------------------

%package mod_version
Summary:	Version dependent configuration
Group:		System/Servers

%description mod_version
This module is designed for the use in test suites and large networks which
have to deal with different httpd versions and different configurations. It
provides a new container -- <IfVersion>, which allows a flexible version
checking including numeric comparisons and regular expressions.

%files mod_version
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/064_mod_version.conf
%attr(0755,root,root) %{_libdir}/apache/mod_version.so

#----------------------------------------------------------------------------

%package mod_remoteip
Summary:	Replaces the original client IP address with the useragent IP address
Group:		System/Servers

%description mod_remoteip
This module is used to treat the useragent which initiated the request
as the originating useragent as identified by httpd for the purposes of
authorization and logging, even where that useragent is behind a load
balancer, front end server, or proxy server.

The module overrides the client IP address for the connection with the
useragent IP address reported in the request header configured with the
RemoteIPHeader directive.

Once replaced as instructed, this overridden useragent IP address is then used
for the mod_authz_host <Require ip> feature, is reported by mod_status, and
is recorded by mod_log_config \%a and core \%a format strings. The underlying
client IP of the connection is available in the \%{c}a format string.  It is
critical to only enable this behavior from intermediate hosts (proxies,
etc) which are trusted by this server, since it is trivial for the remote
useragent to impersonate another useragent.

%files mod_remoteip
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/065_mod_remoteip.conf
%attr(0755,root,root) %{_libdir}/apache/mod_remoteip.so

#----------------------------------------------------------------------------

%package mod_proxy
Summary:	Multi-protocol proxy/gateway server
Group:		System/Servers
Recommends:	apache-mod_proxy_connect
Recommends:	apache-mod_proxy_ftp
Recommends:	apache-mod_proxy_http
Recommends:	apache-mod_proxy_balancer
Recommends:	apache-mod_proxy_uwsgi
%if %{mdvver} >= 201905
Requires(pre):	user(apache)
%endif

%description mod_proxy
Do not enable proxying with ProxyRequests until you have secured your
server. Open proxy servers are dangerous both to your network and to the
Internet at large.

mod_proxy and related modules implement a proxy/gateway for Apache HTTP
Server, supporting a number of popular protocols as well as several different
load balancing algorithms. Third-party modules can add support for additional
protocols and load balancing algorithms.

A set of modules must be loaded into the server to provide the necessary
features. These modules can be included statically at build time
or dynamically via the LoadModule directive). The set must include: *
mod_proxy, which provides basic proxy capabilities * mod_proxy_balancer
and one or more balancer modules, if load
 balancing is required. (See mod_proxy_balancer for more information.)
* one or more proxy scheme, or protocol, modules:

 Protocol Module AJP13 (Apache JServe Protocol version 1.3) mod_proxy_ajp
 CONNECT (for SSL) mod_proxy_connect FastCGI mod_proxy_fcgi ftp mod_proxy_ftp
 HTTP/0.9, HTTP/1.0, and HTTP/1.1 mod_proxy_http SCGI mod_proxy_scgi

In addition, extended features are provided by other modules. Caching is
provided by mod_cache and related modules. The ability to contact remote
servers using the SSL/TLS protocol is provided by the SSLProxy* directives
of mod_ssl. These additional modules will need to be loaded and configured
to take advantage of these features.

%files mod_proxy
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/066_mod_proxy.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy.so
%attr(0770,apache,root) %dir /var/cache/httpd/mod_proxy

#----------------------------------------------------------------------------

%package mod_proxy_connect
Summary:	mod_proxy extension for CONNECT request handling
Group:		System/Servers

%description mod_proxy_connect
This module requires the service of mod_proxy. It provides support for
the CONNECT HTTP method. This method is mainly used to tunnel SSL requests
through proxy servers.

Thus, in order to get the ability of handling CONNECT requests, mod_proxy
and mod_proxy_connect have to be present in the server.

CONNECT is also used, when the server needs to send an HTTPS request through
a forward proxy. In this case the server acts as a CONNECT client. This
functionality is part of mod_proxy and mod_proxy_connect is not needed in
this case.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

%files mod_proxy_connect
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/067_mod_proxy_connect.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_connect.so

#----------------------------------------------------------------------------

%package mod_proxy_ftp
Summary:	FTP support module for mod_proxy
Group:		System/Servers

%description mod_proxy_ftp
This module requires the service of mod_proxy. It provides support for
the proxying FTP sites. Note that FTP support is currently limited to the
GET method.

Thus, in order to get the ability of handling FTP proxy requests, mod_proxy
and mod_proxy_ftp have to be present in the server.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

%files mod_proxy_ftp
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/068_mod_proxy_ftp.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_ftp.so

#----------------------------------------------------------------------------

%package mod_proxy_http
Summary:	HTTP support module for mod_proxy
Group:		System/Servers

%description mod_proxy_http
This module requires the service of mod_proxy. It provides the features used
for proxying HTTP and HTTPS requests. mod_proxy_http supports HTTP/0.9,
HTTP/1.0 and HTTP/1.1. It does not provide any caching abilities. If you
want to set up a caching proxy, you might want to use the additional service
of the mod_cache module.

Thus, in order to get the ability of handling HTTP proxy requests, mod_proxy
and mod_proxy_http have to be present in the server.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

%files mod_proxy_http
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/069_mod_proxy_http.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_http.so

#----------------------------------------------------------------------------

%package mod_proxy_fcgi
Summary:	FastCGI support module for mod_proxy
Group:		System/Servers

%description mod_proxy_fcgi
This module requires the service of mod_proxy. It provides support for the
FastCGI protocol.

Thus, in order to get the ability of handling the FastCGI protocol, mod_proxy
and mod_proxy_fcgi have to be present in the server.

Unlike mod_fcgid and mod_fastcgi, mod_proxy_fcgi has no provision for
starting the application process; fcgistarter is provided for that purpose.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

%files mod_proxy_fcgi
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/070_mod_proxy_fcgi.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_fcgi.so

#----------------------------------------------------------------------------

%package mod_proxy_scgi
Summary:	SCGI gateway module for mod_proxy
Group:		System/Servers

%description mod_proxy_scgi
This module requires the service of mod_proxy. It provides support for the
SCGI protocol, version 1.

Thus, in order to get the ability of handling the SCGI protocol, mod_proxy
and mod_proxy_scgi have to be present in the server.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

%files mod_proxy_scgi
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/071_mod_proxy_scgi.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_scgi.so

#----------------------------------------------------------------------------

%package mod_proxy_fdpass
Summary:	fdpass external process support module for mod_proxy
Group:		System/Servers

%description mod_proxy_fdpass
This module requires the service of mod_proxy. It provides support for the
passing the socket of the client to another process.

mod_proxy_fdpass uses the ability of AF_UNIX domain sockets to pass an open
file descriptor to allow another process to finish handling a request.

The module has a proxy_fdpass_flusher provider interface, which allows
another module to optionally send the response headers, or even the start of
the response body. The default flush provider disables keep-alive, and sends
the response headers, letting the external process just send a response body.

At this time the only data passed to the external process is the client
socket. To receive a client socket, call recvfrom with an allocated struct
cmsghdr. Future versions of this module may include more data after the
client socket, but this is not implemented at this time.

%files mod_proxy_fdpass
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/072_mod_proxy_fdpass.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_fdpass.so

#----------------------------------------------------------------------------

%package mod_proxy_hcheck
Summary:	Dynamic health checking of balancer members (workers)
Group:		System/Servers

%description mod_proxy_hcheck
This module provides for dynamic health checking of balancer members (workers).
This can be enabled on a worker-by-worker basis.
The health check is done independently of the actual reverse proxy requests.

%files mod_proxy_hcheck
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_hcheck.so

#----------------------------------------------------------------------------

%package mod_proxy_ajp
Summary:	AJP support module for mod_proxy
Group:		System/Servers

%description mod_proxy_ajp
This module requires the service of mod_proxy. It provides support for the
Apache JServ Protocol version 1.3 (hereafter AJP13).

Thus, in order to get the ability of handling AJP13 protocol, mod_proxy
and mod_proxy_ajp have to be present in the server.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

%files mod_proxy_ajp
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/073_mod_proxy_ajp.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_ajp.so

#----------------------------------------------------------------------------

%package mod_proxy_balancer
Summary:	mod_proxy extension for load balancing
Group:		System/Servers

%description mod_proxy_balancer
This module requires the service of mod_proxy. It provides load balancing
support for HTTP, FTP and AJP13 protocols

Load balancing scheduler algorithm is provided by not this module but
other modules such as: mod_lbmethod_byrequests, mod_lbmethod_bytraffic,
mod_lbmethod_bybusyness and mod_lbmethod_heartbeat.

Thus, in order to get the ability of load balancing, mod_proxy,
mod_proxy_balancer and at least one of load balancing scheduler algorithm
modules have to be present in the server.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

%files mod_proxy_balancer
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/074_mod_proxy_balancer.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_balancer.so

#----------------------------------------------------------------------------

%package mod_proxy_express
Summary:	Dynamic mass reverse proxy extension for mod_proxy
Group:		System/Servers

%description mod_proxy_express
This module creates dynamically configured mass reverse proxies, by mapping
the Host: header of the HTTP request to a server name and backend URL
stored in a DBM file. This allows for easy use of a huge number of reverse
proxies with no configuration changes. It is much less feature-full than
mod_proxy_balancer, which also provides dynamic growth, but is intended
to handle much, much larger numbers of backends. It is ideally suited as
a front-end HTTP switch.

This module requires the service of mod_proxy.

Do not enable proxying until you have secured your server. Open proxy
servers are dangerous both to your network and to the Internet at large.

Limitations

* This module is not intended to replace the dynamic capability of
 mod_proxy_balancer. Instead, it is intended to be mostly a lightweight
 and fast alternative to using mod_rewrite with RewriteMap and the [P]
 flag for mapped reverse proxying.
* It does not support regex or pattern matching at all.  * It emulates:
 ProxyPass / backend.server:port ProxyPassReverse / backend.server:port
 That is, the entire URL is appended to the mapped backend URL. This is in
 keeping with the intent of being a simple but fast reverse proxy switch.

%files mod_proxy_express
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/075_mod_proxy_express.conf
%attr(0755,root,root) %{_libdir}/apache/mod_proxy_express.so

#----------------------------------------------------------------------------

%package mod_session
Summary:	Session support
Group:		System/Servers

%description mod_session
The session modules make use of HTTP cookies, and as such can fall victim to
Cross Site Scripting attacks, or expose potentially private information to
clients. Please ensure that the relevant risks have been taken into account
before enabling the session functionality on your server.

This module provides support for a server wide per user session
interface. Sessions can be used for keeping track of whether a user has been
logged in, or for other per user information that should be kept available
across requests.

Sessions may be stored on the server, or may be stored on the browser.
Sessions may also be optionally encrypted for added security. These
features are divided into several modules in addition to mod_session;
mod_session_crypto, mod_session_cookie and mod_session_dbd. Depending on the
server requirements, load the appropriate modules into the server (either
statically at compile time or dynamically via the LoadModule directive).

Sessions may be manipulated from other modules that depend on the session,
or the session may be read from and written to using environment variables
and HTTP headers, as appropriate.

%files mod_session
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/076_mod_session.conf
%attr(0755,root,root) %{_libdir}/apache/mod_session.so

#----------------------------------------------------------------------------

%package mod_session_cookie
Summary:	Cookie based session support
Group:		System/Servers

%description mod_session_cookie
The session modules make use of HTTP cookies, and as such can fall victim to
Cross Site Scripting attacks, or expose potentially private information to
clients. Please ensure that the relevant risks have been taken into account
before enabling the session functionality on your server.

This submodule of mod_session provides support for the storage of user
sessions on the remote browser within HTTP cookies.

Using cookies to store a session removes the need for the server or a group
of servers to store the session locally, or collaborate to share a session,
and can be useful for high traffic environments where a server based session
might be too resource intensive.

If session privacy is required, the mod_session_crypto module can be used to
encrypt the contents of the session before writing the session to the client.

For more details on the session interface, see the documentation for the
mod_session module.

%files mod_session_cookie
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/077_mod_session_cookie.conf
%attr(0755,root,root) %{_libdir}/apache/mod_session_cookie.so

#----------------------------------------------------------------------------

%package mod_session_crypto
Summary:	Session encryption support
Group:		System/Servers

%description mod_session_crypto
The session modules make use of HTTP cookies, and as such can fall victim to
Cross Site Scripting attacks, or expose potentially private information to
clients. Please ensure that the relevant risks have been taken into account
before enabling the session functionality on your server.

This submodule of mod_session provides support for the encryption of user
sessions before being written to a local database, or written to a remote
browser via an HTTP cookie.

This can help provide privacy to user sessions where the contents of the
session should be kept private from the user, or where protection is needed
against the effects of cross site scripting attacks.

For more details on the session interface, see the documentation for the
mod_session module.

%files mod_session_crypto
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/078_mod_session_crypto.conf
%attr(0755,root,root) %{_libdir}/apache/mod_session_crypto.so

#----------------------------------------------------------------------------

%package mod_session_dbd
Summary:	DBD/SQL based session support
Group:		System/Servers

%description mod_session_dbd
The session modules make use of HTTP cookies, and as such can fall victim to
Cross Site Scripting attacks, or expose potentially private information to
clients. Please ensure that the relevant risks have been taken into account
before enabling the session functionality on your server.

This submodule of mod_session provides support for the storage of user
sessions within a SQL database using the mod_dbd module.

Sessions can either be anonymous, where the session is keyed by a unique
UUID string stored on the browser in a cookie, or per user, where the
session is keyed against the userid of the logged in user.

SQL based sessions are hidden from the browser, and so offer a measure of
privacy without the need for encryption.

Different webservers within a server farm may choose to share a database,
and so share sessions with one another.

For more details on the session interface, see the documentation for the
mod_session module.

%files mod_session_dbd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/079_mod_session_dbd.conf
%attr(0755,root,root) %{_libdir}/apache/mod_session_dbd.so

#----------------------------------------------------------------------------

%package mod_slotmem_shm
Summary:	Slot-based shared memory provider
Group:		System/Servers

%description mod_slotmem_shm
mod_slotmem_shm is a memory provider which provides for creation and access
to a shared memory segment in which the datasets are organized in "slots."

All shared memory is cleared and cleaned with each restart, whether graceful
or not. The data itself is stored and restored within a file noted by the
name parameter in the create and attach calls.

%files mod_slotmem_shm
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/080_mod_slotmem_shm.conf
%attr(0755,root,root) %{_libdir}/apache/mod_slotmem_shm.so

#----------------------------------------------------------------------------

%package mod_slotmem_plain
Summary:	Slot-based shared memory provider
Group:		System/Servers

%description mod_slotmem_plain
mod_slotmem_plain is a memory provider which provides for creation and access
to a plain memory segment in which the datasets are organized in "slots."

If the memory needs to be shared between threads and processes, a better
provider would be mod_slotmem_shm.

%files mod_slotmem_plain
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/081_mod_slotmem_plain.conf
%attr(0755,root,root) %{_libdir}/apache/mod_slotmem_plain.so

#----------------------------------------------------------------------------

%package mod_ssl
Summary:	Strong cryptography using the SSL and TLS protocols
Group:		System/Servers
Requires:	apache-mod_socache_shmcb
Requires(post):	openssl
%if %{mdvver} >= 201905
Requires(pre):	user(apache)
%endif

%description mod_ssl
This module provides SSL v2/v3 and TLS v1 support for the Apache HTTP
Server. It was contributed by Ralf S. Engelschall based on his mod_ssl
project and originally derived from work by Ben Laurie.

This module relies on OpenSSL to provide the cryptography engine.

Further details, discussion, and examples are provided in the SSL
documentation.

%files mod_ssl
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/082_mod_ssl.conf
%attr(0755,root,root) %{_libdir}/apache/mod_ssl.so
%attr(0700,apache,root) %dir /var/cache/httpd/mod_ssl
%attr(0600,apache,root) %ghost /var/cache/httpd/mod_ssl/scache.dir
%attr(0600,apache,root) %ghost /var/cache/httpd/mod_ssl/scache.pag
%attr(0600,apache,root) %ghost /var/cache/httpd/mod_ssl/scache.sem

%post mod_ssl
if [ "$1" = "1" ]; then

mkdir -p %{_sysconfdir}/pki/tls/{private,certs} 2>/dev/null
umask 077

if [ ! -f %{_sysconfdir}/pki/tls/private/localhost.key ]; then
	%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/pki/tls/private/localhost.key 2> /dev/null
fi

FQDN=`hostname`
if [ "x${FQDN}" = "x" ]; then
	FQDN=localhost.localdomain
fi

if [ ! -f %{_sysconfdir}/pki/tls/certs/localhost.crt ] ; then
cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/pki/tls/private/localhost.key -x509 -days 365 -set_serial $RANDOM -out %{_sysconfdir}/pki/tls/certs/localhost.crt 2>/dev/null
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
${FQDN}
root@${FQDN}
EOF
fi
fi

if [ "$1" -gt "1" ]; then
	mkdir -p %{_sysconfdir}/pki/tls/{private,certs} 2>/dev/null
	if [ -d /etc/ssl/apache ];then
		if [ -f /etc/ssl/apache/server.crt.rpmsave -a ! -f /etc/pki/tls/certs/localhost.crt ]; then
			cp -p /etc/ssl/apache/server.crt.rpmsave /etc/pki/tls/certs/localhost.crt
		fi
		if [ -f /etc/ssl/apache/server.key.rpmsave -a ! -f /etc/pki/tls/private/localhost.key ]; then
		cp -p /etc/ssl/apache/server.key.rpmsave /etc/pki/tls/private/localhost.key
		fi
	fi
fi

# create some ghost files
%create_ghostfile /var/cache/httpd/mod_ssl/scache.dir apache root 0600
%create_ghostfile /var/cache/httpd/mod_ssl/scache.pag apache root 0600
%create_ghostfile /var/cache/httpd/mod_ssl/scache.sem apache root 0600

# http://qa.mandriva.com/show_bug.cgi?id=33429
if [ -f /etc/pki/tls/certs/localhost.crt ]; then
	chmod 644 /etc/pki/tls/certs/localhost.crt
fi

#----------------------------------------------------------------------------

%package mod_optional_hook_export
Summary:	ExportLogTransaction module
Group:		System/Servers

%description mod_optional_hook_export
ExportLogTransaction module.

%files mod_optional_hook_export
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/083_mod_optional_hook_export.conf
%attr(0755,root,root) %{_libdir}/apache/mod_optional_hook_export.so

#----------------------------------------------------------------------------

%package mod_optional_hook_import
Summary:	ImportOptionalHookTestHook module
Group:		System/Servers

%description mod_optional_hook_import
ImportOptionalHookTestHook module.

%files mod_optional_hook_import
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/084_mod_optional_hook_import.conf
%attr(0755,root,root) %{_libdir}/apache/mod_optional_hook_import.so

#----------------------------------------------------------------------------

%package mod_optional_fn_import
Summary:	ImportLogTransaction module
Group:		System/Servers

%description mod_optional_fn_import
ImportLogTransaction module.

%files mod_optional_fn_import
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/085_mod_optional_fn_import.conf
%attr(0755,root,root) %{_libdir}/apache/mod_optional_fn_import.so

#----------------------------------------------------------------------------

%package mod_optional_fn_export
Summary:	optional hook import module
Group:		System/Servers

%description mod_optional_fn_export
Description:optional hook import module.

%files mod_optional_fn_export
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/086_mod_optional_fn_export.conf
%attr(0755,root,root) %{_libdir}/apache/mod_optional_fn_export.so

#----------------------------------------------------------------------------

%package mod_dialup
Summary:	Send static content at a bandwidth rate limit, defined by old modem standards
Group:		System/Servers

%description mod_dialup
It is a module that sends static content at a bandwidth rate limit, defined
by the various old modem standards. So, you can browse your site with a
56k V.92 modem, by adding something like this:

<Location /mysite> ModemStandard V.92 </Location>

Previously to do bandwidth rate limiting modules would have to block an entire
thread, for each client, and insert sleeps to slow the bandwidth down. Using
the new suspend feature, a handler can get callback N milliseconds in the
future, and it will be invoked by the Event MPM on a different thread,
once the timer hits. From there the handler can continue to send data to
the client.

%files mod_dialup
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/087_mod_dialup.conf
%attr(0755,root,root) %{_libdir}/apache/mod_dialup.so

#----------------------------------------------------------------------------

%package mod_lbmethod_byrequests
Summary:	Request Counting load balancer scheduler algorithm for mod_proxy_balancer
Group:		System/Servers

%description mod_lbmethod_byrequests
This module does not provide any configuration directives of its own.
It requires the services of mod_proxy_balancer, and provides the byrequests
load balancing method..

%files mod_lbmethod_byrequests
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/088_mod_lbmethod_byrequests.conf
%attr(0755,root,root) %{_libdir}/apache/mod_lbmethod_byrequests.so

#----------------------------------------------------------------------------

%package mod_lbmethod_bytraffic
Summary:	Weighted Traffic Counting load balancer scheduler for mod_proxy_balancer
Group:		System/Servers

%description mod_lbmethod_bytraffic
This module does not provide any configuration directives of its own.
It requires the services of mod_proxy_balancer, and provides the bytraffic
load balancing method..

%files mod_lbmethod_bytraffic
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/089_mod_lbmethod_bytraffic.conf
%attr(0755,root,root) %{_libdir}/apache/mod_lbmethod_bytraffic.so

#----------------------------------------------------------------------------

%package mod_lbmethod_bybusyness
Summary:	Pending Request Counting load balancer scheduler for mod_proxy_balancer
Group:		System/Servers

%description mod_lbmethod_bybusyness
This module does not provide any configuration directives of its own.
It requires the services of mod_proxy_balancer, and provides the bybusyness
load balancing method.

%files mod_lbmethod_bybusyness
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/090_mod_lbmethod_bybusyness.conf
%attr(0755,root,root) %{_libdir}/apache/mod_lbmethod_bybusyness.so

#----------------------------------------------------------------------------

%package mod_lbmethod_heartbeat
Summary:	Heartbeat Traffic Counting load balancer scheduler for mod_proxy_balancer
Group:		System/Servers

%description mod_lbmethod_heartbeat
lbmethod=heartbeat uses the services of mod_heartmonitor to balance between
origin servers that are providing heartbeat info via the mod_heartbeat module.

This modules load balancing algorithm favors servers with more ready (idle)
capacity over time, but does not select the server with the most ready
capacity every time. Servers that have 0 active clients are penalized,
with the assumption that they are not fully initialized.

%files mod_lbmethod_heartbeat
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/091_mod_lbmethod_heartbeat.conf
%attr(0755,root,root) %{_libdir}/apache/mod_lbmethod_heartbeat.so

#----------------------------------------------------------------------------

%package mod_unixd
Summary:	Basic (required) security for Unix-family platforms
Group:		System/Servers

%description mod_unixd
Basic (required) security for Unix-family platforms.

%files mod_unixd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/092_mod_unixd.conf
%attr(0755,root,root) %{_libdir}/apache/mod_unixd.so

#----------------------------------------------------------------------------

%package mod_heartbeat
Summary:	Sends messages with server status to frontend proxy
Group:		System/Servers

%description mod_heartbeat
mod_heartbeat sends multicast messages to a mod_heartmonitor listener that
advertises the servers current connection count. Usually, mod_heartmonitor
will be running on a proxy server with mod_lbmethod_heartbeat loaded,
which allows ProxyPass to use the "heartbeat" lbmethod inside of ProxyPass.

mod_heartbeat itself is loaded on the origin server(s) that serve
requests through the proxy server(s).  To use mod_heartbeat, mod_status
and mod_watchdog must be either a static modules or, if a dynamic module,
must be loaded before mod_heartbeat.

%files mod_heartbeat
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/093_mod_heartbeat.conf
%attr(0755,root,root) %{_libdir}/apache/mod_heartbeat.so

#----------------------------------------------------------------------------

%package mod_heartmonitor
Summary:	Centralized monitor for mod_heartbeat origin servers
Group:		System/Servers

%description mod_heartmonitor
mod_heartmonitor listens for server status messages generated by
mod_heartbeat enabled origin servers and makes their status available
to mod_lbmethod_heartbeat. This allows ProxyPass to use the "heartbeat"
lbmethod inside of ProxyPass.

This module uses the services of mod_slotmem_shm when available instead
of flat-file storage. No configuration is required to use mod_slotmem_shm.
To use mod_heartmonitor, mod_status and mod_watchdog must be either a static
modules or, if a dynamic module, it must be loaded before mod_heartmonitor.

%files mod_heartmonitor
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/094_mod_heartmonitor.conf
%attr(0755,root,root) %{_libdir}/apache/mod_heartmonitor.so

#----------------------------------------------------------------------------

%package mod_dav
Summary:	Distributed Authoring and Versioning (WebDAV) functionality
Group:		System/Servers
%if %{mdvver} >= 201905
Requires(pre):	user(apache)
Requires(pre):	group(apache)
%endif

%description mod_dav
This module provides class 1 and class 2 WebDAV ('Web-based Distributed
Authoring and Versioning') functionality for Apache. This extension to the
HTTP protocol allows creating, moving, copying, and deleting resources and
collections on a remote web server.

%files mod_dav
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/095_mod_dav.conf
%attr(0755,root,root) %{_libdir}/apache/mod_dav.so
%attr(-,apache,apache) %dir /var/lib/dav
%attr(-,apache,apache) %dir /var/lib/dav/uploads

#----------------------------------------------------------------------------

%package mod_status
Summary:	Provides information on server activity and performance
Group:		System/Servers

%description mod_status
The Status module allows a server administrator to find out how well their
server is performing. A HTML page is presented that gives the current server
statistics in an easily readable form. If required this page can be made
to automatically refresh (given a compatible browser).  Another page gives
a simple machine-readable list of the current server state.

The details given are: * The number of worker serving requests * The number
of idle worker * The status of each worker, the number of requests that
worker has
 performed and the total number of bytes served by the worker (*)
* A total number of accesses and byte count served (*) * The time the server
was started/restarted and the time it has been
 running for
* Averages giving the number of requests per second, the number of
 bytes served per second and the average number of bytes per request (*)
* The current percentage CPU used by each worker and in total by all
 workers combined (*)
* The current hosts and requests being processed (*)

The lines marked "(*)" are only available if ExtendedStatus is On. In
version 2.3.6, loading mod_status will toggle ExtendedStatus On by default.

%files mod_status
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/096_mod_status.conf
%attr(0755,root,root) %{_libdir}/apache/mod_status.so

#----------------------------------------------------------------------------

%package mod_autoindex
Summary:	Generates directory indexes automatically
Group:		System/Servers

%description mod_autoindex
The index of a directory can come from one of two sources:

* A file written by the user, typically called index.html. The DirectoryIndex
  directive sets the name of this file. This is controlled by mod_dir.

* Otherwise, a listing generated by the server. The other directives control
  the format of this listing. The AddIcon, AddIconByEncoding and AddIconByType
  are used to set a list of icons to display for various file types; for each
  file listed, the first icon listed that matches the file is displayed. These
  are controlled by mod_autoindex.

The two functions are separated so that you can completely remove (or replace)
automatic index generation should you want to.

Automatic index generation is enabled with using Options +Indexes. See the
Options directive for more details.

If the FancyIndexing option is given with the IndexOptions directive,
the column headers are links that control the order of the display. If
you select a header link, the listing will be regenerated, sorted by the
values in that column. Selecting the same header repeatedly toggles between
ascending and descending order. These column header links are suppressed
with the IndexOptions directive's SuppressColumnSorting option.

Note that when the display is sorted by "Size", it's the actual size of
the files that's used, not the displayed value - so a 1010-byte file will
always be displayed before a 1011-byte file (if in ascending order) even
though they both are shown as "1K".

%files mod_autoindex
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/097_mod_autoindex.conf
%attr(0755,root,root) %{_libdir}/apache/mod_autoindex.so

#----------------------------------------------------------------------------

%package mod_asis
Summary:	Sends files that contain their own HTTP headers
Group:		System/Servers

%description mod_asis
This module provides the handler send-as-is which causes Apache HTTP Server
to send the document without adding most of the usual HTTP headers.

This can be used to send any kind of data from the server, including
redirects and other special HTTP responses, without requiring a cgi-script
or an nph script.

For historical reasons, this module will also process any file with the
mime type httpd/send-as-is.

%files mod_asis
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/098_mod_asis.conf
%attr(0755,root,root) %{_libdir}/apache/mod_asis.so

#----------------------------------------------------------------------------

%package mod_info
Summary:	Provides a comprehensive overview of the server configuration
Group:		System/Servers

%description mod_info
To configure mod_info, add the following to your httpd.conf file.

<Location /server-info> SetHandler server-info </Location>

You may wish to use mod_access inside the <Location> directive to limit
access to your server configuration information:

<Location /server-info> SetHandler server-info Require host example.com
</Location>

Once configured, the server information is obtained by accessing
http://your.host.example.com/server-info

%files mod_info
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/099_mod_info.conf
%attr(0755,root,root) %{_libdir}/apache/mod_info.so

#----------------------------------------------------------------------------

%package mod_suexec
Summary:	Allows CGI scripts to run as a specified user and Group
Group:		System/Servers

%description mod_suexec
This module, in combination with the suexec support program allows CGI scripts
to run as a specified user and Group.

Normally, when a CGI or SSI program executes, it runs as the same user who is
running the web server.

%files mod_suexec
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/100_mod_suexec.conf
%attr(0755,root,root) %{_libdir}/apache/mod_suexec.so
%attr(0755,root,root) %{_sbindir}/suexec
%attr(0644,root,root) %{_mandir}/man8/suexec.8*

#----------------------------------------------------------------------------

%package mod_cgi
Summary:	Execution of CGI scripts
Group:		System/Servers

%description mod_cgi
Any file that has the handler cgi-script will be treated as a CGI script,
and run by the server, with its output being returned to the client. Files
acquire this handler either by having a name containing an extension defined
by the AddHandler directive, or by being in a ScriptAlias directory.

For an introduction to using CGI scripts with Apache, see our tutorial on
Dynamic Content With CGI.

When using a multi-threaded MPM under unix, the module mod_cgid should
be used in place of this module. At the user level, the two modules are
essentially identical.

For backward-compatibility, the cgi-script handler will also be activated
for any file with the mime-type application/x-httpd-cgi. The use of the
magic mime-type is deprecated.

%files mod_cgi
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/101_mod_cgi.conf
%attr(0755,root,root) %{_libdir}/apache/mod_cgi.so

#----------------------------------------------------------------------------

%package mod_cgid
Summary:	Execution of CGI scripts using an external CGI daemon
Group:		System/Servers

%description mod_cgid
Except for the optimizations and the additional ScriptSock directive noted
below, mod_cgid behaves similarly to mod_cgi. See the mod_cgi summary for
additional details about Apache and CGI.

On certain unix operating systems, forking a process from a multi-threaded
server is a very expensive operation because the new process will replicate
all the threads of the parent process. In order to avoid incurring this
expense on each CGI invocation, mod_cgid creates an external daemon that
is responsible for forking child processes to run CGI scripts. The main
server communicates with this daemon using a unix domain socket.

This module is used by default instead of mod_cgi whenever a multi-threaded
MPM is selected during the compilation process. At the user level, this
module is identical in configuration and operation to mod_cgi. The only
exception is the additional directive ScriptSock which gives the name of
the socket to use for communication with the cgi daemon.

%files mod_cgid
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/102_mod_cgid.conf
%attr(0755,root,root) %{_libdir}/apache/mod_cgid.so

#----------------------------------------------------------------------------

%package mod_dav_fs
Summary:	filesystem provider for mod_dav
Group:		System/Servers

%description mod_dav_fs
This module requires the service of mod_dav. It acts as a support module
for mod_dav and provides access to resources located in the server's file
system. The formal name of this provider is filesystem.  mod_dav backend
providers will be invoked by using the Dav directive:

%files mod_dav_fs
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/103_mod_dav_fs.conf
%attr(0755,root,root) %{_libdir}/apache/mod_dav_fs.so

#----------------------------------------------------------------------------

%package mod_dav_lock
Summary:	generic locking module for mod_dav
Group:		System/Servers

%description mod_dav_lock
This module implements a generic locking API which can be used by any backend
provider of mod_dav. It requires at least the service of mod_dav. But without
a backend provider which makes use of it, it's useless and should not be
loaded into the server. A sample backend module which actually utilizes
mod_dav_lock is mod_dav_svn, the subversion provider module.

Note that mod_dav_fs does not need this generic locking module, because it
uses its own more specialized version.

In order to make mod_dav_lock functional, you just have to specify the
location of the lock database using the DavGenericLockDB directive described
below.

Developer's Note

In order to retrieve the pointer to the locking provider function, you have
to use the ap_lookup_provider API with the arguments dav-lock, generic, and 0.

%files mod_dav_lock
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/104_mod_dav_lock.conf
%attr(0755,root,root) %{_libdir}/apache/mod_dav_lock.so

#----------------------------------------------------------------------------

%package mod_vhost_alias
Summary:	Provides for dynamically configured mass virtual hosting
Group:		System/Servers

%description mod_vhost_alias
This module creates dynamically configured virtual hosts, by allowing the
IP address and/or the Host: header of the HTTP request to be used as part
of the pathname to determine what files to serve. This allows for easy use
of a huge number of virtual hosts with similar configurations.

%files mod_vhost_alias
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/105_mod_vhost_alias.conf
%attr(0755,root,root) %{_libdir}/apache/mod_vhost_alias.so

#----------------------------------------------------------------------------

%package mod_negotiation
Summary:	Provides for content negotiation
Group:		System/Servers

%description mod_negotiation
Content negotiation, or more accurately content selection, is the selection
of the document that best matches the clients capabilities, from one of
several available documents. There are two implementations of this.  *
A type map (a file with the handler type-map) which explicitly
 lists the files containing the variants.
* A Multiviews search (enabled by the Multiviews Options), where the
 server does an implicit filename pattern match, and choose from amongst
 the results.

%files mod_negotiation
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/106_mod_negotiation.conf
%attr(0755,root,root) %{_libdir}/apache/mod_negotiation.so

#----------------------------------------------------------------------------

%package mod_dir
Summary:	Provides for "trailing slash" redirects and serving directory index files
Group:		System/Servers

%description mod_dir
The index of a directory can come from one of two sources: * A file written
by the user, typically called index.html. The
 DirectoryIndex directive sets the name of this file. This is controlled
 by mod_dir.
* Otherwise, a listing generated by the server. This is provided by
 mod_autoindex.

The two functions are separated so that you can completely remove (or replace)
automatic index generation should you want to.

A "trailing slash" redirect is issued when the server receives a
request for a URL http://servername/foo/dirname where dirname is
a directory. Directories require a trailing slash, so mod_dir issues a
redirect to http://servername/foo/dirname/.

%files mod_dir
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/107_mod_dir.conf
%attr(0755,root,root) %{_libdir}/apache/mod_dir.so

#----------------------------------------------------------------------------

%package mod_imagemap
Summary:	Server-side imagemap processing
Group:		System/Servers

%description mod_imagemap
This module processes .map files, thereby replacing the functionality of
the imagemap CGI program. Any directory or document type configured to
use the handler imap-file (using either AddHandler or SetHandler) will be
processed by this module.

The following directive will activate files ending with .map as imagemap
files:

AddHandler imap-file map

Note that the following is still supported:

AddType application/x-httpd-imap map

However, we are trying to phase out "magic MIME types" so we are deprecating
this method.

%files mod_imagemap
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/108_mod_imagemap.conf
%attr(0755,root,root) %{_libdir}/apache/mod_imagemap.so

#----------------------------------------------------------------------------

%package mod_actions
Summary:	Provides for executing CGI scripts based on media type or request method
Group:		System/Servers

%description mod_actions
This module has two directives. The Action directive lets you run CGI scripts
whenever a file of a certain MIME content type is requested.  The Script
directive lets you run CGI scripts whenever a particular method is used in
a request. This makes it much easier to execute scripts that process files.

%files mod_actions
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/109_mod_actions.conf
%attr(0755,root,root) %{_libdir}/apache/mod_actions.so

#----------------------------------------------------------------------------

%package mod_speling
Summary:	Attempts to correct various minor misspellings
Group:		System/Servers

%description mod_speling
Requests to documents sometimes cannot be served by the core apache server
because the request was misspelled or miscapitalized. This module addresses
this problem by trying to find a matching document, even after all other
modules gave up. It does its work by comparing each document name in the
requested directory against the requested document name without regard to
case, and allowing up to one misspelling (character insertion / omission /
transposition or wrong character). A list is built with all document names
which were matched using this strategy.

If, after scanning the directory, * no matching document was found, Apache
will proceed as usual and
 return a "document not found" error.
* only one document is found that "almost" matches the request, then
 it is returned in the form of a redirection response.
* more than one document with a close match was found, then the list
 of the matches is returned to the client, and the client can select the
 correct candidate.

%files mod_speling
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/110_mod_speling.conf
%attr(0755,root,root) %{_libdir}/apache/mod_speling.so

#----------------------------------------------------------------------------

%package mod_userdir
Summary:	User-specific directories
Group:		System/Servers

%description mod_userdir
This module allows user-specific directories to be accessed using the
http://example.com/~user/ syntax.

%files mod_userdir
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/111_mod_userdir.conf
%attr(0755,root,root) %{_libdir}/apache/mod_userdir.so

#----------------------------------------------------------------------------

%package mod_alias
Summary:	Provides for mapping and for URL redirection
Group:		System/Servers

%description mod_alias
The directives contained in this module allow for manipulation and control of
URLs as requests arrive at the server. The Alias and ScriptAlias directives
are used to map between URLs and filesystem paths. This allows for content
which is not directly under the DocumentRoot served as part of the web
document tree. The ScriptAlias directive has the additional effect of
marking the target directory as containing only CGI scripts.

The Redirect directives are used to instruct clients to make a new request
with a different URL. They are often used when a resource has moved to a
new location.

mod_alias is designed to handle simple URL manipulation tasks. For more
complicated tasks such as manipulating the query string, use the tools
provided by mod_rewrite.

%files mod_alias
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/112_mod_alias.conf
%attr(0755,root,root) %{_libdir}/apache/mod_alias.so

#----------------------------------------------------------------------------

%package mod_rewrite
Summary:	Provides a rule-based rewriting engine to rewrite requested URLs on the fly
Group:		System/Servers

%description mod_rewrite
The mod_rewrite module uses a rule-based rewriting engine, based on a
regular-expression parser, to rewrite requested URLs on the fly. By default,
mod_rewrite maps a URL to a filesystem path. However, it can also be used
to redirect one URL to another URL, or to invoke an internal proxy fetch.

mod_rewrite provides a flexible and powerful way to manipulate URLs using
an unlimited number of rules. Each rule can have an unlimited number of
attached rule conditions, to allow you to rewrite URL based on server
variables, environment variables, HTTP headers, or time stamps.

mod_rewrite operates on the full URL path, including the path-info section. A
rewrite rule can be invoked in httpd.conf or in .htaccess.  The path generated
by a rewrite rule can include a query string, or can lead to internal
sub-processing, external request redirection, or internal proxy throughput.

Further details, discussion, and examples, are provided in the detailed
mod_rewrite documentation.

%files mod_rewrite
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/113_mod_rewrite.conf
%attr(0755,root,root) %{_libdir}/apache/mod_rewrite.so

#----------------------------------------------------------------------------

%package htcacheclean
Summary:	Clean up the disk cache (for apache-mod_cache_disk)
Group:		System/Servers
Requires(pre,postun):	rpm-helper
Recommends:	apache-mod_cache_disk = %{EVRD}
Recommends:	apache-mod_proxy = %{EVRD}

%description htcacheclean
htcacheclean is used to keep the size of mod_cache_disk's storage within a
certain limit. This tool can run either manually or in daemon mode. When
running in daemon mode, it sleeps in the background and checks the cache
directories at regular intervals for cached content to be removed.

%files htcacheclean
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/htcacheclean
%attr(0755,root,root) %{_sbindir}/htcacheclean
%{_mandir}/man8/htcacheclean.8*
%{_tmpfilesdir}/htcacheclean.conf
%{_unitdir}/htcacheclean.service

#----------------------------------------------------------------------------

%package devel
Summary:	Module development tools for the apache web server
Group:		Development/C
Requires:	db-devel
Requires:	gdbm-devel
Requires:	sasl-devel
Requires:	pkgconfig(apr-1) >= 1.5.0
Requires:	pkgconfig(apr-util-1) >= 1.5.3
Requires:	pkgconfig(expat)
Requires:	pkgconfig(libpcre)
Requires:	pkgconfig(openssl)
Requires:	pkgconfig(zlib)
# compat with RH/Fedora
Provides:	httpd-devel = %{EVRD}

%description devel
The apache-devel package contains the source code for the apache Web server and
the APXS binary you'll need to build Dynamic Shared Objects (DSOs) for apache.

If you are installing the apache Web server and you want to be able to compile
or develop additional modules for apache, you'll need to install this package.

%files devel
%{_includedir}/apache
# symlink to apache
%{_includedir}/httpd
%attr(0755,root,root) %dir %{_libdir}/apache/build
%attr(0644,root,root) %{_libdir}/apache/build/*.mk
%attr(0755,root,root) %{_libdir}/apache/build/*.sh
%attr(0755,root,root) %{_libdir}/apache/build/envvars
%attr(0755,root,root) %{_sbindir}/envvars-std
%attr(0755,root,root) %{_bindir}/apxs
%attr(0755,root,root) %{_libdir}/apache/httpd.exp

#----------------------------------------------------------------------------

%package source
Summary:	The apache source code, including %{vendor} patches
Group:		System/Servers

%description source
The apache source code, including %{vendor} patches. Use this package to build
your own customized apache if needed.

%files source
%{_usrsrc}/apache-%{version}

#----------------------------------------------------------------------------

%package doc
Summary:	The apache Manual
Group:		Documentation
BuildArch:	noarch

%description doc
This package contains the apache server documentation in HTML format.

Please view the documentaion by starting the apache server and your favourite
web browser and point to this URL: http://localhost/manual

%files doc
%{_datadir}/doc/apache-doc

#----------------------------------------------------------------------------

%prep
%setup -q -n httpd-%{version} -a11
%patch0 -p0 -b .deplibs.droplet
%patch8 -p1 -b .apxs.droplet
%patch16 -p0 -b .fix_extra_htaccess_check.droplet
%patch18 -p0 -b .PR45994.droplet
%patch19 -p1 -b .linux3.droplet
%patch105 -p1 -b .filter.droplet
%patch106 -p1 -b .rosaConfig~
%patch107 -p1 -b .linkage~
%patch108 -p0 -b .buildfix~

# forcibly prevent use of bundled apr, apr-util, pcre
rm -rf srclib/{apr,apr-util,pcre}

# don't install or use bundled pcreposix.h
rm -f include/pcreposix.h

#Fix apxs
perl -pi -e 's|\@exp_installbuilddir\@|%{_libdir}/apache/build|;' support/apxs.in
perl -pi -e 's|get_vars\("prefix"\)|"%{_libdir}/apache/build"|;' support/apxs.in
perl -pi -e 's|get_vars\("sbindir"\) . "/envvars"|"\$installbuilddir/envvars"|;' support/apxs.in

#Correct perl paths
find -type f|xargs perl -pi -e "s|/usr/local/bin/perl|perl|g;\
	s|/usr/local/bin/perl5|perl|g;s|/path/to/bin/perl|perl|g;"

# this is really better and easier than a stupid static patch...
# for some reason you have to use ">>" here (!)

cat >> config.layout << EOF
<Layout NUX>
    prefix:        %{_sysconfdir}/httpd
    exec_prefix:   %{_prefix}
    bindir:        %{_bindir}
    sbindir:       %{_sbindir}
    libdir:        %{_libdir}
    libexecdir:    %{_libdir}/apache
    mandir:        %{_mandir}
    infodir:       %{_infodir}
    includedir:    %{_includedir}/apache
    sysconfdir:    %{_sysconfdir}/httpd/conf
    datadir:       /var/www
    installbuilddir: %{_libdir}/apache/build
    errordir:      /var/www/error
    iconsdir:      /var/www/icons
    htdocsdir:     /var/www/html
    manualdir:     %{_datadir}/doc/apache-doc
    cgidir:        /var/www/cgi-bin
    localstatedir: /var
    runtimedir:    /var/run/httpd
    logfiledir:    /var/log/httpd
    proxycachedir: /var/cache/httpd/mod_proxy
</Layout>
EOF

#Fix DYNAMIC_MODULE_LIMIT
perl -pi -e "s/DYNAMIC_MODULE_LIMIT 256/DYNAMIC_MODULE_LIMIT %{?!maxmodules:%{defaultmaxmodules}}%{?maxmodules:%{maxmodules}}/;" include/httpd.h

# don't try to touch srclib
perl -pi -e "s|^SUBDIRS = .*|SUBDIRS = os server modules support|g" Makefile.in

# bump server limit
perl -pi -e "s|DEFAULT_SERVER_LIMIT 256|DEFAULT_SERVER_LIMIT %{?!serverlimit:%{defaultserverlimit}}%{?serverlimit:%{serverlimit}}|g" server/mpm/prefork/prefork.c

# tag it with the "legacy" name so that we can track this at netcraft...
perl -pi -e "s|^#define AP_SERVER_BASEPRODUCT .*|#define AP_SERVER_BASEPRODUCT \"%{BASEPRODUCT}\"|g" include/ap_release.h

# avoid regenerating code with yacc
pushd server
    touch util_expr_scan.c util_expr_parse.c util_expr_parse.h util_expr_scan.l util_expr_parse.y
popd

# use my nice converted transparent png icons
tar -jxf %{SOURCE3}
mv icons/*.png docs/icons/

# prepare the apache-source package
rm -rf %{_builddir}/tmp-httpd-%{version}; mkdir -p %{_builddir}/tmp-httpd-%{version}/usr/src
cp -dpR %{_builddir}/httpd-%{version} %{_builddir}/tmp-httpd-%{version}/usr/src/apache-%{version}
rm -rf %{_builddir}/tmp-httpd-%{version}/usr/src/apache-%{version}/tmp-httpd-%{version}/usr/src
rm -f %{_builddir}/tmp-httpd-%{version}%{_usrsrc}/apache-%{version}/*.spec
rm -rf %{_builddir}/tmp-httpd-%{version}/usr/src/apache-%{version}/Mandriva

# add the htcacheclean stuff
cp %{SOURCE9} htcacheclean.service
cp %{SOURCE10} htcacheclean.sysconfig

# this will only work if configured correctly in the config (FullOs)...
cp server/core.c server/core.c.untagged

# some adjustments here
perl -pi -e "s|_MODULE_DIR_|%{_libdir}/apache|g" ROSA/*_mod_*.conf

# Build the systemd file
cp %{SOURCE15} httpd.service
for mpm in worker event; do
    sed "s,@NAME@,${mpm},g;s,@EXEC@,%{_sbindir}/httpd-${mpm},g" httpd.service > httpd-${mpm}.service
done
touch -r httpd.service httpd-${mpm}.service

%build
%serverbuild

#########################################################################################
# configure and build phase
#

# use a minimal buildconf instead
cp %{SOURCE100} buildconf
sh ./buildconf

CFLAGS="`echo $RPM_OPT_FLAGS |sed -e 's/-fomit-frame-pointer//'`"
CPPFLAGS="-DSSL_EXPERIMENTAL_ENGINE -DLDAP_DEPRECATED"
if pkg-config openssl; then
    # configure -C barfs with trailing spaces in CFLAGS
    CFLAGS="$RPM_OPT_FLAGS $CPPFLAGS"
    CPPFLAGS="$CPPFLAGS `pkg-config --cflags openssl | sed 's/ *$//'`"
    AP_LIBS="$AP_LIBS `pkg-config --libs openssl`"
else
    CFLAGS="$RPM_OPT_FLAGS"
    CPPFLAGS="$CPPFLAGS"
    AP_LIBS="$AP_LIBS -lssl -lcrypto"
fi
export CFLAGS CPPFLAGS AP_LIBS

export SH_LDFLAGS="%{ldflags}"

APVARS="--enable-layout=NUX \
    --prefix=%{_sysconfdir}/httpd \
    --exec-prefix=%{_prefix} \
    --bindir=%{_bindir} \
    --sbindir=%{_sbindir} \
    --libexecdir=%{_libdir}/apache \
    --sysconfdir=%{_sysconfdir}/httpd/conf \
    --localstatedir=/var \
    --includedir=%{_includedir}/apache \
    --infodir=%{_infodir} \
    --mandir=%{_mandir} \
    --datadir=/var/www \
    --with-port=80 \
    --with-perl=%{_bindir}/perl \
    --with-apr=%{_bindir}/apr-1-config \
    --with-apr-util=%{_bindir}/apu-1-config \
    --with-pcre=%{_prefix} \
    --with-z=%{_prefix} \
    --enable-layout=NUX \
    --with-devrandom \
    --enable-exception-hook \
    --enable-forward \
    --with-program-name=httpd"

for mpm in worker event prefork; do
    mkdir build-${mpm}; pushd build-${mpm}
    ln -s ../configure .

    if [ ${mpm} = prefork ]; then
        %configure $APVARS \
	    --with-mpm=prefork \
	    --enable-modules=all \
	    --enable-mods-shared=all \
	    --with-ldap --enable-ldap=shared --enable-authnz-ldap=shared \
	    --enable-cache=shared --enable-disk-cache=shared --enable-file-cache=shared --enable-mem-cache=shared \
	    --enable-ssl --with-ssl=%{_prefix} --disable-distcache \
	    --enable-deflate=shared \
	    --enable-cgid=shared \
	    --enable-proxy=shared --enable-proxy-connect=shared --enable-proxy-ftp=shared \
	    --enable-proxy-http=shared --enable-proxy-ajp=shared --enable-proxy-balancer=shared \
	    --enable-proxy-fdpass \
	    --enable-dav=shared --enable-dav-fs=shared --enable-dav-lock=shared \
	    --enable-version=shared \
	    --enable-bucketeer=shared --enable-case-filter=shared --enable-case-filter-in=shared --enable-echo=shared \
	    --enable-example=shared --enable-optional-fn-export=shared --enable-optional-fn-import=shared \
	    --enable-optional-hook-export=shared --enable-optional-hook-import=shared \
	    --enable-charset_lite=shared --enable-authn_alias=shared \
	    --enable-cern-meta=shared \
	    --enable-ident=shared \
	    --enable-imagemap=shared \
	    --enable-suexec=shared

    # nuke excessive use of ldflags
    perl -pi -e "s|^LDFLAGS.*|LDFLAGS = %{ldflags}|g" build/config_vars.mk
    perl -pi -e "s|^SH_LDFLAGS.*|SH_LDFLAGS = %{ldflags}|g" build/config_vars.mk

    fi

    if [ ${mpm} = worker ]; then
	%configure $APVARS \
	    --with-mpm=worker \
	    --enable-modules=none
    # don't build support tools
    perl -pi -e "s|^SUBDIRS = .*|SUBDIRS = os server modules|g" Makefile
    # nuke excessive use of ldflags
    perl -pi -e "s|^LDFLAGS.*|LDFLAGS = %{ldflags}|g" build/config_vars.mk
    perl -pi -e "s|^SH_LDFLAGS.*|SH_LDFLAGS = %{ldflags}|g" build/config_vars.mk
    fi

    if [ ${mpm} = event ]; then
	%configure $APVARS \
    	    --with-mpm=event \
	    --enable-modules=none
    # don't build support tools
    perl -pi -e "s|^SUBDIRS = .*|SUBDIRS = os server modules|g" Makefile
    # nuke excessive use of ldflags
    perl -pi -e "s|^LDFLAGS.*|LDFLAGS = %{ldflags}|g" build/config_vars.mk
    perl -pi -e "s|^SH_LDFLAGS.*|SH_LDFLAGS = %{ldflags}|g" build/config_vars.mk
    fi

    #Copy configure flags to a file in the apache-source rpm.
    cp config.nice %{_builddir}/tmp-httpd-%{version}%{_usrsrc}/apache-%{version}/config.nice.${mpm}

    # tag it with the mpm name too so that we can track this somehow at for example netcraft...
    MPM_NAME=`echo ${mpm}|tr "[a-z]" "[A-Z]"`
    cp ../server/core.c.untagged ../server/core.c
    perl -pi -e "s|\" PLATFORM \"|%{TAG}/${MPM_NAME}-%{release}|g" ../server/core.c

    # if libexpat0-devel is installed on x86_64 somehow the EXTRA_LDLAGS is set 
    # to -L/usr/lib, fix that with a conditional hack...
    %ifarch x86_64
	find -type f | xargs perl -pi -e "s|/usr/lib\b|%{_libdir}|g"
    %endif

    # finally doing the build stage
    %make
    popd
done

# Create default/prefork service file for systemd
sed "s,@NAME@,prefork,g;s,@EXEC@,%{_sbindir}/httpd,g" httpd.service > httpd.service.def
touch -r httpd.service httpd.service.def

%install
#########################################################################################
# install phase

install -d %{buildroot}%{_libdir}/apache
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d
install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d
install -d %{buildroot}%{_sysconfdir}/httpd/conf/vhosts.d
install -d %{buildroot}%{_sysconfdir}/httpd/modules.d
install -d %{buildroot}%{_sysconfdir}/logrotate.d
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -d %{buildroot}/var/cache/httpd/mod_proxy
install -d %{buildroot}/var/lib/dav
install -d %{buildroot}/var/lib/dav/uploads
install -d %{buildroot}/var/log/httpd
install -d %{buildroot}/var/run/httpd
install -d %{buildroot}/var/www/perl

#EXCLUDE_FROM_STRIP="%{buildroot}%{_sbindir}/httpd %{buildroot}%{_sbindir}/httpd-worker %{buildroot}%{_sbindir}/httpd-peruser"

# install source
tar -cf - -C %{_builddir}/tmp-httpd-%{version} usr/src | tar x -C %{buildroot} -f -

pushd build-prefork
make install \
	prefix=%{_sysconfdir}/httpd \
	bindir=%{buildroot}%{_bindir} \
	sbindir=%{buildroot}%{_sbindir} \
	libdir=%{buildroot}%{_libdir} \
	libexecdir=%{buildroot}%{_libdir}/apache \
	mandir=%{buildroot}%{_mandir} \
	sysconfdir=%{buildroot}%{_sysconfdir}/httpd/conf \
	includedir=%{buildroot}%{_includedir}/apache \
	localstatedir=%{buildroot}/var \
	runtimedir=%{buildroot}/var/run \
	installbuilddir=%{buildroot}%{_libdir}/apache/build  \
	datadir=%{buildroot}/var/www \
	errordir=%{buildroot}/var/www/error \
	iconsdir=%{buildroot}/var/www/icons \
	htdocsdir=%{buildroot}/var/www/html \
	manualdir=%{buildroot}%{_datadir}/doc/apache-doc \
	cgidir=%{buildroot}/var/www/cgi-bin \
	runtimedir=%{buildroot}/var/run \
	logdir=%{buildroot}/var/log/httpd \
	logfiledir=%{buildroot}/var/log/httpd \
	proxycachedir=%{buildroot}/var/cache/httpd/mod_proxy
popd

# do some house cleaning 
for f in `find %{buildroot} -type f -name ".orig"` \
    `find %{buildroot} -type f -name ".deps"` \
    `find %{buildroot} -type f -name "NW*"` \
    `find %{buildroot} -type f -name "*.droplet"` \
    `find %{buildroot} -type f -name "*.zip"` \
    `find %{buildroot} -type f -name "*.dsp"`; do
    rm -f $f
done

#Fix config_vars.mk, and add some MDK flags so all other modules 
#can simply do "apxs -q VARIABLE" and know, for example, the exact
#release of apache-devel or the exact directory where the source is
#located. 
CVMK="%{buildroot}%{_libdir}/apache/build/config_vars.mk"
perl -pi -e "s|%{_builddir}/httpd-%{version}|%{_usrsrc}/apache-%{version}|g" $CVMK
perl -pi -e "s|%{buildroot}||g" $CVMK
perl -pi -e "s|^EXTRA_INCLUDES.*|EXTRA_INCLUDES = `apr-1-config --includes` -I%{_includedir}/apache -I%{_includedir}/openssl|g" $CVMK

# fix libtool invocation
perl -pi -e "s|^LIBTOOL.*|LIBTOOL = libtool|g" $CVMK
perl -pi -e "s|^SH_LIBTOOL.*|SH_LIBTOOL = libtool|g" $CVMK

# if the following 3 lines needs to be enabled again, use the ".*" wildcard as in
# "s|bla bla =.*|bla bla = replaced whatever text after the equal char...|g"
#perl -pi -e "s|installbuilddir =.*|installbuilddir = %{_libdir}/apache/build|g" $CVMK
#perl -pi -e "s|htdocsdir =.*|htdocsdir = /var/www/html|g" $CVMK
#perl -pi -e "s|logfiledir =.*|logfiledir = /var/log/httpd|g" $CVMK
echo "ap_version = %{version}" >> $CVMK
echo "ap_release = %{release}" >> $CVMK

#########################################################################################
# fix some bugs and other stuff
#
perl -pi -e "s|%{_builddir}/httpd-%{version}|%{_usrsrc}/apache-%{version}|g" %{buildroot}%{_libdir}/apache/build/apr_rules.mk

mv %{buildroot}%{_sbindir}/envvars %{buildroot}%{_libdir}/apache/build/

# named config.nice files are in the devel package
rm -f %{buildroot}%{_libdir}/apache/build/config.nice

##################################################################
# install module conf files for the "modules.d" dir loading structure
install -m0644 ROSA/*mod_*.conf %{buildroot}%{_sysconfdir}/httpd/modules.d/

install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d

# install the mpm stuff
install -m0755 build-worker/httpd %{buildroot}%{_sbindir}/httpd-worker
install -m0755 build-event/httpd %{buildroot}%{_sbindir}/httpd-event

# install alternative MPMs; executables, man pages, and systemd service files
install -d %{buildroot}%{_unitdir}
for mpm in worker event; do
    install -p -m 644 httpd-${mpm}.service %{buildroot}%{_unitdir}/httpd-${mpm}.service
done

# Default httpd (prefork) service file
install -p -m 644 httpd.service.def %{buildroot}%{_unitdir}/httpd.service

# Install tmpfiles.d config for httpd
install -m 0644 %{SOURCE16} -D %{buildroot}%{_tmpfilesdir}/httpd.conf
install -m 0644 %{SOURCE17} -D %{buildroot}%{_tmpfilesdir}/htcacheclean.conf

install -d -m 755 %{buildroot}/var/cache/httpd/mod_proxy
install -d -m 755 %{buildroot}/var/lib/dav

# install htcacheclean files
install -m0644 htcacheclean.service %{buildroot}%{_unitdir}/htcacheclean.service
install -m0644 htcacheclean.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/htcacheclean

# install missing files
install -m755 build-prefork/support/split-logfile %{buildroot}%{_sbindir}/split-logfile
install -m755 support/list_hooks.pl %{buildroot}%{_sbindir}/list_hooks.pl
install -m755 build-prefork/support/logresolve.pl %{buildroot}%{_sbindir}/logresolve.pl
install -m755 build-prefork/support/log_server_status %{buildroot}%{_sbindir}/log_server_status
install -m755 build-prefork/support/checkgid %{buildroot}%{_sbindir}/checkgid
install -m755 support/check_forensic %{buildroot}%{_sbindir}/check_forensic

# fix a msec safe cache for the ssl stuff
install -d %{buildroot}/var/cache/httpd/mod_ssl
touch %{buildroot}/var/cache/httpd/mod_ssl/scache.dir
touch %{buildroot}/var/cache/httpd/mod_ssl/scache.pag
touch %{buildroot}/var/cache/httpd/mod_ssl/scache.sem

# fix a msec safe cache for the mod_ldap LDAPSharedCacheFile
touch %{buildroot}/var/cache/httpd/mod_ldap_cache

install -m0644 ROSA/fileprotector.conf %{buildroot}%{_sysconfdir}/httpd/conf/fileprotector.conf
install -m0644 ROSA/httpd.sysconf %{buildroot}%{_sysconfdir}/sysconfig/httpd
install -m0644 ROSA/favicon.ico %{buildroot}/var/www/html/
install -m0644 ROSA/robots.txt %{buildroot}/var/www/html/
install -m0644 ROSA/rpm.png  %{buildroot}/var/www/icons/
install -m0644 ROSA/httpd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/httpd

# add two important documentation files in the plain ASCII format
cp docs/manual/upgrading.html.en upgrading.html
cp docs/manual/new_features_2_4.html.en new_features_2_4.html

lynx -dump -nolist upgrading.html > upgrading.txt
lynx -dump -nolist new_features_2_4.html > new_features_2_4.txt

# fix the manual
find %{buildroot}%{_datadir}/doc/apache-doc -type d -exec chmod 755 {} \;
find %{buildroot}%{_datadir}/doc/apache-doc -type f -exec chmod 644 {} \;

# let's not ship those, they might reveal some information to unwanted eyes
rm -rf %{buildroot}/var/www/cgi-bin/printenv*
rm -rf %{buildroot}/var/www/cgi-bin/test-cgi

# '#include "httpd/httpd.h"' is hardcoded in e.g. pki-core (Dogtag),
# make a symlink for compatibility with Red Hat/Fedora
( cd %{buildroot}%{_includedir}
  ln -s apache httpd
)

mkdir -p %{buildroot}%{_sysusersdir}/
install -m0644 %{SOURCE18} %{buildroot}%{_sysusersdir}/apache.conf

#########################################################################################
# install phase done
#