-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttpd.conf
More file actions
37 lines (30 loc) · 1.67 KB
/
Copy pathhttpd.conf
File metadata and controls
37 lines (30 loc) · 1.67 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
#this allows, if set cors as security,
# that inside apps cannot be accessed
# and be hacked ... !!! cool stuff
# as they cannot be accessed,
# it is just port forwarding,
# and noone knows where they live
Listen 8080
<VirtualHost *:8080>
ServerName my-dev-app-01
DocumentRoot /var/www/html/myapp
Alias /factrpt /var/www/html/myapp
#Header Set Access-Control-Allow-Origin "*"
#Header Set Access-Control-Allow-Methods 'GET,PUT,POST,DELETE,OPTIONS
# keep the url intact
ProxyPass "/myapp/url1pattern" "http://localhost:portapp1name/url1pattern"
ProxyPassReverse "/myapp/url1pattern" "http://localhost:portapp1name/url1pattern"
# to discriminate url forwarding by a url prefix eg: http://devserver/myappprefix/v1/urlpart1/urlpart2 -> http://localhost:port1/myappprefix/v1/urlpart1/urlpart2
ProxyPass "/myapp/url2pattern" "http://localhost:portapp2name/url2pattern"
ProxyPassReverse "/myapp/url2pattern" "http://localhost:portapp2name/url2pattern"
# to discriminate url forwarding by a url prefix eg: http://devserver/myappprefix/v1/urlpart1/urlpart2 -> http://localhost:port1/myappprefix/urlpart1/urlpart2
<LocationMatch ^\/myapp\/version1\/?(.*)$>
ProxyPass http://localhost:port1/myapp/$1
ProxyPassReverse http://localhost:port1/myapp/$1
</LocationMatch
# to discriminate url forwarding by a url prefix eg: http://devserver/myappprefix/v2/urlpart1/urlpart2 -> http://localhost:port2/myappprefix/urlpart1/urlpart2
<LocationMatch ^\/myapp\/version2\/?(.*)$>
ProxyPass http://localhost:port2/myapp/$1
ProxyPassReverse http://localhost:port2/myapp/$1
</LocationMatch>
</VirtualHost>