source: main/adopters/nm/trunk/src/main/serverconfigs/dmzr2nmibis001/apache_httpd_reverse_proxy/extra/httpd-vhosts.conf @ 24586

Last change on this file since 24586 was 24586, checked in by Paul Leo, 5 months ago

Adding apache httpd reverse proxy config files, including Let's Encrypt configuration
Currently using Let's Encrypt staging, not production, one day renewal for testing
Only using port 443 for cert renewal for now.
nmtracking is password protected

File size: 4.7 KB
Line 
1# Virtual Hosts
2#
3# Required modules: mod_log_config
4
5# If you want to maintain multiple domains/hostnames on your
6# machine you can setup VirtualHost containers for them. Most configurations
7# use only name-based virtual hosts so the server doesn't need to worry about
8# IP addresses. This is indicated by the asterisks in the directives below.
9#
10# Please see the documentation at
11# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
12# for further details before you try to setup virtual hosts.
13#
14# You may use the command line option '-S' to verify your virtual host
15# configuration.
16
17###
18### VirtualHost example:
19### Almost any Apache directive may go into a VirtualHost container.
20### The first VirtualHost section is used for all requests that do not
21### match a ServerName or ServerAlias in any <VirtualHost> block.
22###
23###<VirtualHost *:80>
24###    ServerAdmin webmaster@dummy-host.example.com
25###    DocumentRoot "${SRVROOT}/docs/dummy-host.example.com"
26###    ServerName dummy-host.example.com
27###    ServerAlias www.dummy-host.example.com
28###    ErrorLog "logs/dummy-host.example.com-error.log"
29###    CustomLog "logs/dummy-host.example.com-access.log" common
30###</VirtualHost>
31###
32
33##### VirtualHost ibisnew.health.state.nm.us #####
34
35        <VirtualHost 10.100.2.15:443>
36          ServerName ibisnew.health.state.nm.us
37          #### use http2, and permit acme to just use 443
38          #### Protocols h2 http/1.1
39          Protocols h2 http/1.1 acme-tls/1
40         
41          SSLEngine on
42
43          # For use of rotatelogs, see https://httpd.apache.org/docs/2.4/programs/rotatelogs.html
44          # am using rotate every day and keep 7 days, could keep more.
45          # you could also rotate at midnight and create a log with date, but keeping only x logs will not work with that
46          ### NOTE: -c not permitted in windows, may be other options also not permitted, see explanation in next section log_conf_module
47          # -v is verbose output for debugging, BUT...
48          # try first with access, if you try with Errorlog, and you have something wrong, no log will be produced.
49          # note daily is 86400, testing is 60 (every minute)
50          # Next line is for testing log rotation every 20 seconds, keep 7 files, verbose output
51          # ErrorLog "|bin/rotatelogs.exe -l -v -n 7 logs/error.log 20"
52          # Next line is for production, rotate every day, keep 14 logs
53          ErrorLog "|bin/rotatelogs.exe -l -v -n 14 logs/ibisnew_error.log 86400"
54          CustomLog "|bin/rotatelogs.exe -l -f -v -n 14 logs/ibisnew_access.log 86400" combined
55         
56                # Reverse proxy for this virtual host
57                       
58                        ProxyPreserveHost on
59                        ProxyRequests off
60                       
61                        <Proxy *>
62                                Require all granted 
63                        </Proxy>
64
65                #### do not proxy the following, but let httpd respond, these directories are Apache httpd related
66                #### they are also restricted to certain hosts at bottom of http.conf file
67               
68                        ProxyPass "/server-status" "!"
69                        ProxyPass "/md-status" "!"
70                        ProxyPass "/.svn" "!"
71                       
72                        ProxyPass / http://dohr2simnmibis2/nmibis-view/
73                        ProxyPassReverse / http://dohr2simnmibis2/nmibis-view/
74                        ProxyPassReverseCookiePath "/" "/nmibis-view"
75                       
76                ####Once secure has been set up
77                ####    ProxyPass / https://dohr2simnmibis2/nmibis-view/
78                ####    ProxyPassReverse / https://dohr2simnmibis2/nmibis-view/
79                ####    ProxyPassReverseCookiePath "/"  "/nmibis-view"
80                       
81        </VirtualHost>
82
83############### VirtualHost nmtracknew.nmtracking.org #####
84
85
86<VirtualHost 10.100.2.17:443>
87          ServerName nmtracknew.nmtracking.org
88          #### use http2, and permit acme to just use 443
89          ##### turn offf acme Protocols h2 http/1.1 acme-tls/1
90          ##### Protocols h2 http/1.1
91          Protocols h2 http/1.1 acme-tls/1
92          SSLEngine on
93          LogLevel debug
94          ErrorLog "|bin/rotatelogs.exe -l -v -n 14 logs/nmtrackingnew_error.log 86400"
95          CustomLog "|bin/rotatelogs.exe -l -f -v -n 14 logs/nmtrackingnew_access.log 86400" combined
96
97        #### Reverse proxy for this virtual host ####
98               
99                        ProxyPreserveHost on
100                        ProxyRequests off
101                       
102                        ##### Password Protect NMEPHT (in this case staging.ibis.dataphilesconsulting.com)
103                       
104                        <Proxy *>
105                                ####Require all granted
106                                AuthType Basic
107                                AuthName "Staging, enter username and password for access"
108                                AuthBasicProvider file
109                                AuthUserFile "C:\Apache-2.4.52\conf\nmtrackuser.txt"
110                                Require user nmtracking
111                        </Proxy>
112                       
113                #### do not proxy the following, but let httpd respond, these directories are Apache httpd related
114                #### they are also restricted to certain hosts at bottom of http.conf file
115               
116                        ProxyPass "/server-status" "!"
117                        ProxyPass "/md-status" "!"
118                        ProxyPass "/.svn" "!"
119
120                        ProxyPass / http://dohr2simnmibis2/nmepht-view/
121                        ProxyPassReverse / http://dohr2simnmibis2/nmepht-view/
122                        ####ProxyPassReverseCookiePath "/" "/nmepht-view"
123                       
124        </VirtualHost>
Note: See TracBrowser for help on using the repository browser.