Commit 29ec5ded authored by HongzheWang's avatar HongzheWang

stack/lamp:Add changeable root file path

parent aaaf939a
......@@ -37,6 +37,7 @@ part-list = matomo-backup.sh matomo-backup-cron
db-name = matomo
db-user = matomo
db-password = 12345678
root-path = /matomo
[template-matomo-instance]
recipe = slapos.recipe.template:jinja2
......
<VirtualHost *:{{ parameter_dict['port'] }}>
ServerAdmin admin@example.com
DocumentRoot {{ parameter_dict['document-root'] }}/matomo
DocumentRoot {{ parameter_dict['document-root'] }}{{ root_path }}
SetEnvIf Origin "^http(s)?://(.+\.)?(app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
......@@ -18,7 +18,7 @@
Dav off
</Directory>
ErrorLog "{{ parameter_dict['log-dir'] }}/matomo-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/matomo-access.log" combined
ErrorLog "{{ parameter_dict['log-dir'] }}/lamp-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/lamp-access.log" combined
</VirtualHost>
......@@ -57,6 +57,14 @@ part-list =
db-name = lamp
db-user = lamp
db-password = insecure
# routing
# The default location of the LAMP URL link is
# ~/srv/project/runner/instance/slappartX/srv/www/
# If you want to redirect it, edit this keyword
# for example, root-path = /matomo
# that means the root document path is changed to
# ~/srv/project/runner/instance/slappartX/srv/www/matomo
root-path = /
#----------------
#-- Instance-level buildout profiles.
......@@ -107,6 +115,7 @@ context =
key db_name custom-application-deployment:db-name
key db_user custom-application-deployment:db-user
key db_password custom-application-deployment:db-password
key root_path custom-application-deployment:root-path
key lamp_apache_httpd template-apache-httpd:target
[instance-apache-php]
......
......@@ -14,11 +14,11 @@
# not need these here).
[instance]
filename = instance.cfg.in
md5sum = b87556b0e5651bc8217c1bccbdd6b4d7
md5sum = 053f8ba78c2634a1ef7586e025dcc2cc
[instance-apache-php]
filename = instance-apache-php.cfg.in
md5sum = 8506f245087dfdc02561e8739a567bd6
md5sum = b1494674c9a373d6e87affd55281ec4c
[instance-lamp]
filename = instance-lamp.cfg.jinja2.in
......@@ -34,4 +34,4 @@ md5sum = 980f603c34fcb008ce73a9dde2dbceb3
[template-apache-httpd]
filename = apache-httpd.conf.in
md5sum = 9940e05d5e624a7884f4e6e062355798
md5sum = b6c5a467759582a321063242ae2a635e
......@@ -140,6 +140,7 @@ url = {{ lamp_apache_httpd }}
output = ${directory:apache.d}/lamp.conf
context =
section parameter_dict apache-php-configuration
raw root_path {{ root_path }}
[apache-php-conf]
recipe = slapos.recipe.template:jinja2
......
......@@ -73,6 +73,7 @@ extra-context =
key custom_application_template application-parameters:custom-application-template
section parameter_dict dynamic-template-apache-php-parameters
raw lamp_apache_httpd {{ lamp_apache_httpd }}
raw root_path {{ root_path }}
[dynamic-template-mariadb-parameters]
bash = {{ bash_location }}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment