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 ...@@ -37,6 +37,7 @@ part-list = matomo-backup.sh matomo-backup-cron
db-name = matomo db-name = matomo
db-user = matomo db-user = matomo
db-password = 12345678 db-password = 12345678
root-path = /matomo
[template-matomo-instance] [template-matomo-instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
<VirtualHost *:{{ parameter_dict['port'] }}> <VirtualHost *:{{ parameter_dict['port'] }}>
ServerAdmin admin@example.com 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 SetEnvIf Origin "^http(s)?://(.+\.)?(app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Dav off Dav off
</Directory> </Directory>
ErrorLog "{{ parameter_dict['log-dir'] }}/matomo-error.log" ErrorLog "{{ parameter_dict['log-dir'] }}/lamp-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/matomo-access.log" combined CustomLog "{{ parameter_dict['log-dir'] }}/lamp-access.log" combined
</VirtualHost> </VirtualHost>
...@@ -57,6 +57,14 @@ part-list = ...@@ -57,6 +57,14 @@ part-list =
db-name = lamp db-name = lamp
db-user = lamp db-user = lamp
db-password = insecure 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. #-- Instance-level buildout profiles.
...@@ -107,6 +115,7 @@ context = ...@@ -107,6 +115,7 @@ context =
key db_name custom-application-deployment:db-name key db_name custom-application-deployment:db-name
key db_user custom-application-deployment:db-user key db_user custom-application-deployment:db-user
key db_password custom-application-deployment:db-password key db_password custom-application-deployment:db-password
key root_path custom-application-deployment:root-path
key lamp_apache_httpd template-apache-httpd:target key lamp_apache_httpd template-apache-httpd:target
[instance-apache-php] [instance-apache-php]
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = b87556b0e5651bc8217c1bccbdd6b4d7 md5sum = 053f8ba78c2634a1ef7586e025dcc2cc
[instance-apache-php] [instance-apache-php]
filename = instance-apache-php.cfg.in filename = instance-apache-php.cfg.in
md5sum = 8506f245087dfdc02561e8739a567bd6 md5sum = b1494674c9a373d6e87affd55281ec4c
[instance-lamp] [instance-lamp]
filename = instance-lamp.cfg.jinja2.in filename = instance-lamp.cfg.jinja2.in
...@@ -34,4 +34,4 @@ md5sum = 980f603c34fcb008ce73a9dde2dbceb3 ...@@ -34,4 +34,4 @@ md5sum = 980f603c34fcb008ce73a9dde2dbceb3
[template-apache-httpd] [template-apache-httpd]
filename = apache-httpd.conf.in filename = apache-httpd.conf.in
md5sum = 9940e05d5e624a7884f4e6e062355798 md5sum = b6c5a467759582a321063242ae2a635e
...@@ -140,6 +140,7 @@ url = {{ lamp_apache_httpd }} ...@@ -140,6 +140,7 @@ url = {{ lamp_apache_httpd }}
output = ${directory:apache.d}/lamp.conf output = ${directory:apache.d}/lamp.conf
context = context =
section parameter_dict apache-php-configuration section parameter_dict apache-php-configuration
raw root_path {{ root_path }}
[apache-php-conf] [apache-php-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -73,6 +73,7 @@ extra-context = ...@@ -73,6 +73,7 @@ extra-context =
key custom_application_template application-parameters:custom-application-template key custom_application_template application-parameters:custom-application-template
section parameter_dict dynamic-template-apache-php-parameters section parameter_dict dynamic-template-apache-php-parameters
raw lamp_apache_httpd {{ lamp_apache_httpd }} raw lamp_apache_httpd {{ lamp_apache_httpd }}
raw root_path {{ root_path }}
[dynamic-template-mariadb-parameters] [dynamic-template-mariadb-parameters]
bash = {{ bash_location }} 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