Skip to content

Commit 8593ef2

Browse files
committed
Update vhost-gen
1 parent 7680af2 commit 8593ef2

File tree

4 files changed

+2
-187
lines changed

4 files changed

+2
-187
lines changed

Dockerfiles/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LABEL \
1212
###
1313
### Build arguments
1414
###
15-
ARG VHOST_GEN_GIT_REF=1.0.7
15+
ARG VHOST_GEN_GIT_REF=1.0.8
1616
ARG WATCHERD_GIT_REF=v1.0.7
1717
ARG CERT_GEN_GIT_REF=0.10
1818

Dockerfiles/Dockerfile.debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LABEL \
1212
###
1313
### Build arguments
1414
###
15-
ARG VHOST_GEN_GIT_REF=1.0.7
15+
ARG VHOST_GEN_GIT_REF=1.0.8
1616
ARG WATCHERD_GIT_REF=v1.0.7
1717
ARG CERT_GEN_GIT_REF=0.10
1818

Dockerfiles/data/docker-entrypoint.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,18 +258,6 @@ if [ "${VHOSTGEN_HTTPD_SERVER}" = "nginx" ]; then
258258
"${MAIN_DOCROOT_BASE}/${MAIN_VHOST_TEMPLATE_DIR}" \
259259
"${MAIN_VHOST_SSL_TYPE}" \
260260
"/etc/vhost-gen/templates-main/"
261-
elif [ "${VHOSTGEN_HTTPD_SERVER}" = "apache22" ]; then
262-
# Adding custom nginx vhost template to ensure Reverse Proxy works.
263-
# Module ProxyHTMLURLMap does not seet to exist in Apache 2.2 modules directory.
264-
# The modified template has this outcommented
265-
vhostgen_main_generate \
266-
"${MAIN_VHOST_ENABLE}" \
267-
"${MAIN_DOCROOT_BASE}/${MAIN_VHOST_DOCROOT_DIR}" \
268-
"${MAIN_VHOST_BACKEND}" \
269-
"/etc/vhost-gen/main.yml" \
270-
"${MAIN_DOCROOT_BASE}/${MAIN_VHOST_TEMPLATE_DIR}" \
271-
"${MAIN_VHOST_SSL_TYPE}" \
272-
"/etc/vhost-gen/templates-main/"
273261
else
274262
vhostgen_main_generate \
275263
"${MAIN_VHOST_ENABLE}" \
Lines changed: 0 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -1,173 +0,0 @@
1-
---
2-
3-
#
4-
# Slightly modified version of the nginx template to fix Reverse Proxy
5-
# ProxyHTMLMap is not available on this version of Apache 2.2
6-
#
7-
# Search this file for 'CHANGED:'
8-
#
9-
#
10-
11-
# Apache 2.2 vHost Template defintion for vhost-gen.py
12-
#
13-
# The 'feature' section contains optional features that can be enabled via
14-
# conf.yml and will then be replaced into the main vhost ('structure' section)
15-
# into their corresponding position:
16-
#
17-
# __XDOMAIN_REQ__
18-
# __PHP_FPM__
19-
# __ALIASES__
20-
# __DENIES__
21-
# __STATUS__
22-
#
23-
# The features itself also contain variables to be adjusted in conf.yml
24-
# and will then be replaced in their corresponding feature section
25-
# before being replaced into the vhost section (if enabled):
26-
#
27-
# PHP-FPM:
28-
# __PHP_ADDR__
29-
# __PHP_PORT__
30-
# XDomain:
31-
# __REGEX__
32-
# Alias:
33-
# __REGEX__
34-
# __PATH__
35-
# Deny:
36-
# __REGEX__
37-
# Status:
38-
# __REGEX__
39-
#
40-
# Variables to be replaced directly in the vhost configuration can also be set
41-
# in conf.yml and include:
42-
# __VHOST_NAME__
43-
# __DOCUMENT_ROOT__
44-
# __INDEX__
45-
# __ACCESS_LOG__
46-
# __ERROR_LOG__
47-
# __PHP_ADDR__
48-
# __PHP_PORT__
49-
#
50-
51-
52-
###
53-
### Basic vHost skeleton
54-
###
55-
vhost: |
56-
<VirtualHost __DEFAULT_VHOST__:__PORT__>
57-
ServerName __VHOST_NAME__
58-
59-
CustomLog "__ACCESS_LOG__" combined
60-
ErrorLog "__ERROR_LOG__"
61-
62-
__REDIRECT__
63-
__SSL__
64-
__VHOST_DOCROOT__
65-
__VHOST_RPROXY__
66-
__PHP_FPM__
67-
__ALIASES__
68-
__DENIES__
69-
__SERVER_STATUS__
70-
# Custom directives
71-
__CUSTOM__
72-
</VirtualHost>
73-
74-
###
75-
### vHost Type (normal or reverse proxy)
76-
###
77-
vhost_type:
78-
# Normal vHost (-p)
79-
docroot: |
80-
# Define the vhost to serve files
81-
DocumentRoot "__DOCUMENT_ROOT__"
82-
<Directory "__DOCUMENT_ROOT__">
83-
DirectoryIndex __INDEX__
84-
85-
AllowOverride All
86-
Options All
87-
88-
RewriteEngine on
89-
RewriteBase /
90-
91-
Order allow,deny
92-
Allow from all
93-
</Directory>
94-
95-
# Reverse Proxy (-r)
96-
rproxy: |
97-
# Define the vhost to reverse proxy
98-
ProxyRequests off
99-
ProxyPass __LOCATION__ __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__
100-
# CHANGED:
101-
#ProxyHTMLURLMap __PROXY_PROTO__://__PROXY_ADDR__:__PROXY_PORT__ __LOCATION__
102-
# end of CHANGED:
103-
<location __LOCATION__>
104-
ProxyPassReverse /
105-
# CHANGED:
106-
#SetOutputFilter proxy-html
107-
#ProxyHTMLURLMap / __LOCATION__
108-
#ProxyHTMLURLMap __LOCATION__ __LOCATION__
109-
# end of CHANGED:
110-
RequestHeader unset Accept-Encoding
111-
</location>
112-
113-
114-
###
115-
### Optional features to be enabled in vHost
116-
###
117-
features:
118-
119-
# SSL Configuration
120-
ssl: |
121-
SSLEngine on
122-
SSLCertificateFile "__SSL_PATH_CRT__"
123-
SSLCertificateKeyFile "__SSL_PATH_KEY__"
124-
SSLProtocol __SSL_PROTOCOLS__
125-
SSLHonorCipherOrder __SSL_HONOR_CIPHER_ORDER__
126-
SSLCipherSuite __SSL_CIPHERS__
127-
128-
# Redirect to SSL directive
129-
redirect: |
130-
RedirectMatch (.*) https://__VHOST_NAME__:__SSL_PORT__$1
131-
132-
# PHP-FPM will not be applied to a reverse proxy!
133-
php_fpm: |
134-
# PHP-FPM Definition
135-
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://__PHP_ADDR__:__PHP_PORT____DOCUMENT_ROOT__/$1 timeout=__PHP_TIMEOUT__
136-
137-
alias: |
138-
# Alias Definition
139-
Alias "__ALIAS__" "__PATH____ALIAS__"
140-
<Location "__ALIAS__">
141-
__XDOMAIN_REQ__
142-
</Location>
143-
<Directory "__PATH____ALIAS__">
144-
Order allow,deny
145-
Allow from all
146-
</Directory>
147-
148-
deny: |
149-
# Deny Definition
150-
<FilesMatch "__REGEX__">
151-
Order allow,deny
152-
Deny from all
153-
</FilesMatch>
154-
155-
server_status: |
156-
# Status Page
157-
<Location __REGEX__>
158-
SetHandler server-status
159-
Order allow,deny
160-
Allow from all
161-
</Location>
162-
163-
xdomain_request: |
164-
# Allow cross domain request from these hosts
165-
SetEnvIf Origin "__REGEX__" AccessControlAllowOrigin=$0
166-
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
167-
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
168-
Header always set Access-Control-Max-Age "0"
169-
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
170-
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
171-
RewriteEngine On
172-
RewriteCond %{REQUEST_METHOD} OPTIONS
173-
RewriteRule ^(.*)$ $1 [R=200,L]

0 commit comments

Comments
 (0)