Commit 7a409b87 authored by Alain Takoudjou's avatar Alain Takoudjou

Add Dashboard for apache website with Ajaxplorer and phpmyadmin

parent 9878019a
...@@ -10,12 +10,19 @@ parts = ...@@ -10,12 +10,19 @@ parts =
cron-entry-logrotate cron-entry-logrotate
promise promise
ca-apache
phpmyadmin.inc
configure-sites
publish-connection-informations
dashboard-parameters
configuration-promise
frontend-ajaxupload-promise frontend-ajaxupload-promise
frontend-website2-promise frontend-phpmyadmin-promise
frontend-website-promise frontend-website-promise
frontend-dashboard-promise
ajaxplorer-load-promise
# content-promise # content-promise
configure-ajaxplorer
publish-connection-informations
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -56,7 +63,11 @@ logrotate-backup = $${basedirectory:backup}/logrotate ...@@ -56,7 +63,11 @@ logrotate-backup = $${basedirectory:backup}/logrotate
report = $${rootdirectory:etc}/report report = $${rootdirectory:etc}/report
stunnel-conf = $${rootdirectory:etc}/stunnel stunnel-conf = $${rootdirectory:etc}/stunnel
xml-report = $${rootdirectory:var}/xml_report xml-report = $${rootdirectory:var}/xml_report
www = $${rootdirectory:srv}/www/ www = $${rootdirectory:srv}/www
www-data = $${rootdirectory:srv}/www-data
www-dsh = $${rootdirectory:srv}/www-dsh
ssl = $${rootdirectory:etc}/ssl
phantomjs-scripts = $${rootdirectory:etc}/phantomjs
[cadirectory] [cadirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -166,6 +177,14 @@ wrapper = $${basedirectory:services}/stunnel ...@@ -166,6 +177,14 @@ wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file} key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file} cert-file = $${stunnel:cert-file}
[ca-apache]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
key-file = $${httpd-conf:key_file}
cert-file = $${httpd-conf:cert_file}
executable = $${apache-php:wrapper}
wrapper = $${basedirectory:services}/apache
#---------------- #----------------
#-- #--
...@@ -189,6 +208,19 @@ url = $${request-mariadb:connection-url} ...@@ -189,6 +208,19 @@ url = $${request-mariadb:connection-url}
#---------------- #----------------
#-- #--
#-- Deploy Apache + PHP application. #-- Deploy Apache + PHP application.
[dashboard_credential]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.dashboard.passwd
user = $${slap-parameter:dashboard-user}
bytes = 4
[htpasswd]
recipe = plone.recipe.command
output = $${rootdirectory:etc}/.dhtpasswd
command =
${apache:location}/bin/htpasswd -cb $${:output} $${dashboard_credential:user} $${dashboard_credential:passwd}
update-command = $${:command}
[httpd-conf] [httpd-conf]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-httpd-conf:location}/${template-httpd-conf:filename} url = ${template-httpd-conf:location}/${template-httpd-conf:filename}
...@@ -197,17 +229,23 @@ mode = 0600 ...@@ -197,17 +229,23 @@ mode = 0600
document_root = $${rootdirectory:srv}/www/ document_root = $${rootdirectory:srv}/www/
public_html = $${:document_root}data/files/public_html/ public_html = $${:document_root}data/files/public_html/
public_html2 = $${:document_root}data/files/public_html2/ phpmyadmin_root = $${directory:www-data}
dashboard_root = $${directory:www-dsh}
dashboard_pwd = $${htpasswd:output}
pid_file = $${basedirectory:run}/apache.pid pid_file = $${basedirectory:run}/apache.pid
lock_file = $${basedirectory:run}/apache.lock lock_file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
port = 8080 port = 8080
port2 = 8070 port2 = 8060
port3 = 8090 port3 = 8070
port4 = 8090
port_https = 4443
error_log = $${directory:httpd-log}/error.log error_log = $${directory:httpd-log}/error.log
access_log = $${directory:httpd-log}/access.log access_log = $${directory:httpd-log}/access.log
php_ini_dir = $${directory:php-ini-dir} php_ini_dir = $${directory:php-ini-dir}
php_lib_path = ${apache-php:location}/lib/php php_lib_path = ${apache-php:location}/lib/php
key_file = $${directory:ssl}/services.key
cert_file = $${directory:ssl}/services.crt
# Deploy Apache + PHP application # Deploy Apache + PHP application
...@@ -227,7 +265,7 @@ error-log = $${directory:httpd-log}/error.log ...@@ -227,7 +265,7 @@ error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log access-log = $${directory:httpd-log}/access.log
php-ini-dir = $${directory:php-ini-dir} php-ini-dir = $${directory:php-ini-dir}
tmp-dir = $${directory:tmp-php} tmp-dir = $${directory:tmp-php}
wrapper = $${basedirectory:services}/apache wrapper = $${rootdirectory:bin}/apache_raw
httpd-binary = ${apache:location}/bin/httpd httpd-binary = ${apache:location}/bin/httpd
...@@ -243,14 +281,21 @@ mysql-port = $${stunnel:local-port} ...@@ -243,14 +281,21 @@ mysql-port = $${stunnel:local-port}
environment = environment =
PATH=${apache-php:location}/bin:${imagemagick:location}/bin PATH=${apache-php:location}/bin:${imagemagick:location}/bin
[configure-ajaxplorer] [rand_password]
recipe = plone.recipe.command recipe = slapos.cookbook:generate.password
convert = ${imagemagick:location}/bin/convert storage-path = $${rootdirectory:etc}/.cookie.phpmyadmin
command = mkdir -p $${httpd-conf:public_html} && \ bytes = 6
mkdir -p $${httpd-conf:public_html2} && \
sed -i 's#/usr/bin/convert#$${:convert}#' $${apache-php:htdocs}/plugins/editor.imagick/manifest.xml && \
sed -i 's#enabled="false"#enabled="true"#' $${apache-php:htdocs}/plugins/editor.imagick/manifest.xml [phpmyadmin.inc]
update-command = $${:command} recipe = slapos.recipe.template
url = ${template-phpmyadmin:location}/${template-phpmyadmin:filename}
output = $${httpd-conf:phpmyadmin_root}/config.inc.php
mode = 0600
mysql_host = $${stunnel:local-host}
mysql_port = $${stunnel:local-port}
rand_pwd = $${rand_password:passwd}
[logrotate-entry-apache] [logrotate-entry-apache]
<= logrotate <= logrotate
...@@ -286,20 +331,31 @@ name = Frontend-FileManager ...@@ -286,20 +331,31 @@ name = Frontend-FileManager
software-url = $${slap-parameter:frontend-software-url} software-url = $${slap-parameter:frontend-software-url}
slave = true slave = true
config = url custom_domain config = url custom_domain
config-url = http://[$${httpd-conf:ip}]:$${httpd-conf:port2}/ config-url = https://[$${httpd-conf:ip}]:$${httpd-conf:port2}/
return = site_url
config-custom_domain =
[request-frontend-phpmyadmin]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Frontend-Phpmyadmin
software-url = $${slap-parameter:frontend-software-url}
slave = true
config = url custom_domain
config-url = https://[$${httpd-conf:ip}]:$${httpd-conf:port3}/
return = site_url return = site_url
config-custom_domain = $${slap-parameter:filemanager-domain} config-custom_domain =
[request-frontend2] [request-frontend-dashboard]
<= slap-connection <= slap-connection
recipe = slapos.cookbook:requestoptional recipe = slapos.cookbook:requestoptional
name = Frontend-public_html2 name = Frontend-Dashboard
software-url = $${slap-parameter:frontend-software-url} software-url = $${slap-parameter:frontend-software-url}
slave = true slave = true
config = url custom_domain config = url custom_domain
config-url = http://[$${httpd-conf:ip}]:$${httpd-conf:port3}/ config-url = https://[$${httpd-conf:ip}]:$${httpd-conf:port4}/
return = site_url return = site_url
config-custom_domain = $${slap-parameter:site2-domain} config-custom_domain =
#---------------- #----------------
...@@ -326,18 +382,37 @@ config-custom_domain = $${slap-parameter:site2-domain} ...@@ -326,18 +382,37 @@ config-custom_domain = $${slap-parameter:site2-domain}
[publish-connection-informations] [publish-connection-informations]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
dashboard_backend = https://[$${apache-php:ip}]:$${httpd-conf:port4}
dashboard = $${request-frontend-dashboard:connection-site_url}
login = $${dashboard_credential:user}
password = $${dashboard_credential:passwd}
[dashboard-parameters]
recipe = slapos.recipe.template
url = ${template-dashboard:location}/${template-dashboard:filename}
output = $${directory:www-dsh}/config.php
mode = 0600
public_html_backend = $${apache-php:url} public_html_backend = $${apache-php:url}
public_html = $${request-frontend:connection-site_url} public_html = $${request-frontend:connection-site_url}
public_html2_backend = http://[$${apache-php:ip}]:$${httpd-conf:port3} phpmyadmin_backend = https://[$${apache-php:ip}]:$${httpd-conf:port3}
public_html2 = $${request-frontend2:connection-site_url} phpmyadmin = $${request-frontend-phpmyadmin:connection-site_url}
fileManager_backend = http://[$${apache-php:ip}]:$${httpd-conf:port2} filemanager_backend = https://[$${apache-php:ip}]:$${httpd-conf:port2}
fileManager = $${request-frontend-ajaxupload:connection-site_url} filemanager = $${request-frontend-ajaxupload:connection-site_url}
mysql_username = $${apache-php:mysql-username} mysql_username = $${apache-php:mysql-username}
mysql_password = $${apache-php:mysql-password} mysql_password = $${apache-php:mysql-password}
mysql_database = $${apache-php:mysql-database} mysql_database = $${apache-php:mysql-database}
mysql_host = $${apache-php:mysql-host} mysql_host = $${apache-php:mysql-host}
mysql_port = $${apache-php:mysql-port} mysql_port = $${apache-php:mysql-port}
apache_error_log = $${apache-php:error-log}
apache_access_log = $${apache-php:access-log}
joomla_folder = ${joomla:location}
prestashop_folder = ${prestashop:location}/prestashop
drupal_folder = ${drupal:location}
wp_folder = ${wordpress:location}
#XXX - This folder should exist in Ajaxplorer directory
upload_folder = $${directory:www}/data/files/upload/
www_folder = $${httpd-conf:public_html}
#---------------- #----------------
#-- #--
...@@ -349,26 +424,30 @@ path = $${basedirectory:promises}/apache ...@@ -349,26 +424,30 @@ path = $${basedirectory:promises}/apache
hostname = $${apache-php:ip} hostname = $${apache-php:ip}
port = $${apache-php:port} port = $${apache-php:port}
[frontend-website-promise] [check-url-promise]
recipe = slapos.cookbook:check_url_available recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend-website
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl curl_path = ${curl:location}/bin/curl
[frontend-website2-promise] [frontend-website-promise]
recipe = slapos.cookbook:check_url_available <= check-url-promise
path = $${basedirectory:promises}/frontend-website2 path = $${basedirectory:promises}/frontend-website
url = $${request-frontend2:connection-site_url} url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl [frontend-phpmyadmin-promise]
<= check-url-promise
path = $${basedirectory:promises}/frontend-phpmyadmin
url = $${request-frontend-phpmyadmin:connection-site_url}
[frontend-ajaxupload-promise] [frontend-ajaxupload-promise]
recipe = slapos.cookbook:check_url_available <= check-url-promise
path = $${basedirectory:promises}/frontend-ajaxupload path = $${basedirectory:promises}/frontend-ajaxupload
url = $${request-frontend-ajaxupload:connection-site_url} url = $${request-frontend-ajaxupload:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl [frontend-dashboard-promise]
<= check-url-promise
path = $${basedirectory:promises}/frontend-dashboard
url = $${request-frontend-dashboard:connection-site_url}
[content-promise] [content-promise]
recipe = slapos.cookbook:check_page_content recipe = slapos.cookbook:check_page_content
...@@ -379,16 +458,61 @@ dash_path = ${dash:location}/bin/dash ...@@ -379,16 +458,61 @@ dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl curl_path = ${curl:location}/bin/curl
[slap-parameter] [slap-parameter]
# Default value if no domain is specified # Default value if no domain is specified
site-domain = site-domain =
filemanager-domain =
site2-domain =
frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
# Default value if no ssh parameter is specified dashboard-user = admin
logbox-ip = ajaxplorer-user = admin
logbox-port = ajaxplorer-pwd = insecure
logbox-user =
logbox-passwd = #
# * Configure Ajaxplorer, setup imagemagik in ajaxplorer
# * Copy phpmyadmin files sources into phpmyadmin_root folder
#
[configuration-js]
recipe = slapos.recipe.template
url = ${template-configure:location}/${template-configure:filename}
content-url = https://[$${apache-php:ip}]:$${httpd-conf:port2}/
user = $${slap-parameter:ajaxplorer-user}
password = $${slap-parameter:ajaxplorer-pwd}
storage-type = serial
output = $${directory:phantomjs-scripts}/configure.js
mode = 0644
[configuration-promise]
recipe = slapos.cookbook:check_page_content_phantomjs
path = $${basedirectory:promises}/configuration-promise
dash-path = ${dash:location}/bin/dash
phantomjs-path = ${phantomjs:location}/phantomjs-slapos
phantomjs-options = --ignore-ssl-errors=true
script-path = $${configuration-js:output}
[ajaxplorer-load-js]
recipe = slapos.recipe.template
url = ${template-testboot:location}/${template-testboot:filename}
content-url = https://[$${apache-php:ip}]:$${httpd-conf:port2}/
mode = 0644
output = $${directory:phantomjs-scripts}/test-boot.js
[ajaxplorer-load-promise]
recipe = slapos.cookbook:check_page_content_phantomjs
path = $${basedirectory:promises}/ajaxplorer-load-promise
dash-path = ${dash:location}/bin/dash
phantomjs-path = ${phantomjs:location}/phantomjs-slapos
phantomjs-options = --ignore-ssl-errors=true
script-path = $${ajaxplorer-load-js:output}
[configure-sites]
recipe = plone.recipe.command
convert = ${imagemagick:location}/bin/convert
command = mkdir -p $${httpd-conf:public_html} && \
chmod -R 700 $${httpd-conf:public_html} && \
sed -i 's#/usr/bin/convert#$${:convert}#' $${apache-php:htdocs}/plugins/editor.imagick/manifest.xml && \
sed -i 's#enabled="false"#enabled="true"#' $${apache-php:htdocs}/plugins/editor.imagick/manifest.xml && \
sed -i 's#//define("AJXP_LOCALE", "en_EN.UTF-8");#define("AJXP_LOCALE", "fr_FR.UTF-8");#' $${apache-php:htdocs}/conf/bootstrap_conf.php && \
sed -i 's#default="en"#default="fr"#' $${apache-php:htdocs}/plugins/boot.conf/manifest.xml && \
sed -i 's#default="en"#default="fr"#' $${apache-php:htdocs}/plugins/core.ajaxplorer/manifest.xml && \
cp -nr ${phpmyadmin:location}/* $${httpd-conf:phpmyadmin_root} && \
cp -nr ${dashboard:location}/* $${httpd-conf:dashboard_root}
update-command = $${:command}
...@@ -10,11 +10,10 @@ parts = ...@@ -10,11 +10,10 @@ parts =
rdiff-backup rdiff-backup
dropbear dropbear
template-httpd-conf
application application
dashboard
phpmyadmin
instance-eggs instance-eggs
website1-template
website2-template
instance instance
instance-apache-php instance-apache-php
...@@ -53,6 +52,7 @@ extends = ...@@ -53,6 +52,7 @@ extends =
../../component/sqlite3/buildout.cfg ../../component/sqlite3/buildout.cfg
../../component/zlib/buildout.cfg ../../component/zlib/buildout.cfg
../../component/git/buildout.cfg ../../component/git/buildout.cfg
../../component/phantomjs/buildout.cfg
../../stack/resilient/buildout.cfg ../../stack/resilient/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
...@@ -73,7 +73,7 @@ md5sum = f9ee461a59e83592c19581dc9efc7dd9 ...@@ -73,7 +73,7 @@ md5sum = f9ee461a59e83592c19581dc9efc7dd9
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apachephp.cfg.in url = ${:_profile_base_location_}/instance-apachephp.cfg.in
output = ${buildout:directory}/template-apachephp.cfg output = ${buildout:directory}/template-apachephp.cfg
md5sum = 0c574497ad00ef2e1ce684ceccda3f5e md5sum = 6a78c7d4c361387ab247709eb33f2a35
mode = 0644 mode = 0644
[instance-apache-import] [instance-apache-import]
...@@ -140,40 +140,84 @@ url = http://freefr.dl.sourceforge.net/project/ajaxplorer/ajaxplorer/stable-chan ...@@ -140,40 +140,84 @@ url = http://freefr.dl.sourceforge.net/project/ajaxplorer/ajaxplorer/stable-chan
md5sum = 805cd6a473b3d3516388450afc5a0e6a md5sum = 805cd6a473b3d3516388450afc5a0e6a
strip-top-level-dir = true strip-top-level-dir = true
[website] [dashboard]
recipe = z3c.recipe.mkdir recipe = hexagonit.recipe.download
path1 = ${application:location}/data/files/public_html url = ${:_profile_base_location_}/src/dashboard.tar.gz
path2 = ${application:location}/data/files/public_html2 md5sum = b343f735eb03983c89a1f3a7eab109b3
paths = #strip-top-level-dir = true
${:path1}
${:path2}
[website1-template] [phpmyadmin]
recipe = slapos.recipe.template recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/templates/index.html.in url = http://cznic.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.4/phpMyAdmin-4.1.4-all-languages.zip
output = ${website:path1}/index.html md5sum = 019ef3b9c69b52cbf0dde251b43b93b3
md5sum = 979c36dc7dbf9d1e89818060f32a39b7 strip-top-level-dir = true
mode = 0644
folder = public_html [wordpress]
recipe = hexagonit.recipe.download
url = http://fr.wordpress.org/wordpress-3.8-fr_FR.tar.gz
md5sum = e63279a155edb215946e91a8a6b37bee
strip-top-level-dir = true
[website2-template] [prestashop]
recipe = slapos.recipe.template recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/templates/index.html.in url = http://www.prestashop.com/download/old/prestashop_1.5.6.2.zip
output = ${website:path2}/index.html md5sum = 3229c53959ca0d4ab5993d935f35f5c8
md5sum = 979c36dc7dbf9d1e89818060f32a39b7
mode = 0644
folder = public_html2 [joomla]
recipe = hexagonit.recipe.download
url = http://downloads.joomlacode.org/frsrelease/1/3/4/134333/Joomla_3.2.1-Stable-Full_Package.zip
md5sum = 000d5efdf8f7f50faf622308ef1e6540
[template-httpd-conf] [drupal]
recipe = hexagonit.recipe.download
url = http://ftp.drupal.org/files/projects/drupal-7.26.tar.gz
md5sum = 740bd57f524b8ac18a203b663ca1329d
strip-top-level-dir = true
[download-base]
recipe = slapos.recipe.download recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename} url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644 mode = 0644
filename = apache.conf.in
md5sum = ffb1105e2620e9e9f1f45093b67a3df8
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template-httpd-conf]
<= download-base
filename = apache.conf.in
md5sum = ba3f9b91751b63007f170f77ee72f556
[template-phpmyadmin]
<= download-base
filename = phpmyadmin.inc.php.in
md5sum = aebc4d1d0944933b14fbc874da340a17
[template-dashboard]
<= download-base
filename = dashboard.conf.php.in
md5sum = aec9d1e78c4042bb2cd080b558ab8178
[template-configure]
<= download-base
filename = configure.js.in
md5sum = 9a6c8a799c41b7ca569d948a6eccc667
[template-testboot]
<= download-base
filename = test-boot.js.in
md5sum = aa9aa9b77666fb9d56d48b051210c6b5
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = grid-computing
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[networkcache] [networkcache]
# signature certificates of the following uploaders. # signature certificates of the following uploaders.
# Romain Courteaud # Romain Courteaud
...@@ -291,62 +335,3 @@ signature-certificate-list = ...@@ -291,62 +335,3 @@ signature-certificate-list =
-----END CERTIFICATE----- -----END CERTIFICATE-----
[versions] [versions]
Jinja2 = 2.6
Werkzeug = 0.9.1
#Error: Couldn't install: lxml 3.1.2
lxml = 3.1.1
# Numpy 1.7.0 doesn't install well
numpy = 1.6.2
# websockify 0.4.1 doesn't install well
websockify = 0.3.0
slapos.cookbook=0.78.1
setuptools = 0.6c12dev-r88846
MarkupSafe = 0.18
buildout-versions = 1.7
cliff = 1.4
cmd2 = 0.6.5.1
inotifyx = 0.2.0-1
itsdangerous = 0.22
lxml = 3.2.1
meld3 = 0.6.10
netaddr = 0.7.10
netifaces = 0.8-1
plone.recipe.command = 1.1
prettytable = 0.7.2
pytz = 2013b
rdiff-backup = 1.0.5
requests = 1.2.3
slapos.core = 0.35.1
slapos.recipe.build = 0.11.6
slapos.recipe.cmmi = 0.1.1
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
supervisor = 3.0b2
xml-marshaller = 0.9.7
z3c.recipe.mkdir = 0.6
# Required by:
# slapos.core==0.35.1
Flask = 0.10.1
# Required by:
# slapos.cookbook==0.78.2.dev
lock-file = 2.0
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.3
# Required by:
# plone.recipe.command==1.1
setuptools = 0.8
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
...@@ -6,6 +6,7 @@ PidFile "${:pid_file}" ...@@ -6,6 +6,7 @@ PidFile "${:pid_file}"
Listen ${:ip}:${:port} Listen ${:ip}:${:port}
Listen ${:ip}:${:port2} Listen ${:ip}:${:port2}
Listen ${:ip}:${:port3} Listen ${:ip}:${:port3}
Listen ${:ip}:${:port4}
PHPINIDir ${:php_ini_dir} PHPINIDir ${:php_ini_dir}
ServerAdmin someone@email ServerAdmin someone@email
TypesConfig conf/mime.types TypesConfig conf/mime.types
...@@ -21,9 +22,13 @@ LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Ag ...@@ -21,9 +22,13 @@ LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Ag
LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b" common LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b" common
CustomLog "${:access_log}" common CustomLog "${:access_log}" common
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
NameVirtualHost ${:ip}:${:port2} NameVirtualHost ${:ip}:${:port2}
NameVirtualHost ${:ip}:${:port} NameVirtualHost ${:ip}:${:port}
NameVirtualHost ${:ip}:${:port3} NameVirtualHost ${:ip}:${:port3}
NameVirtualHost ${:ip}:${:port4}
<VirtualHost ${:ip}:${:port2}> <VirtualHost ${:ip}:${:port2}>
#ServerName www.example.com #ServerName www.example.com
...@@ -42,6 +47,9 @@ NameVirtualHost ${:ip}:${:port3} ...@@ -42,6 +47,9 @@ NameVirtualHost ${:ip}:${:port3}
DocumentRoot ${:document_root} DocumentRoot ${:document_root}
DirectoryIndex index.html index.php DirectoryIndex index.html index.php
SSLEngine on
SSLCertificateFile ${:cert_file}
SSLCertificateKeyFile ${:key_file}
</VirtualHost> </VirtualHost>
...@@ -76,14 +84,43 @@ NameVirtualHost ${:ip}:${:port3} ...@@ -76,14 +84,43 @@ NameVirtualHost ${:ip}:${:port3}
Require all denied Require all denied
</Directory> </Directory>
<Directory ${:public_html2}> <Directory ${:phpmyadmin_root}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride All AllowOverride All
Require all granted Require all granted
</Directory> </Directory>
DocumentRoot ${:public_html2} DocumentRoot ${:phpmyadmin_root}
DirectoryIndex index.html index.php
SSLEngine on
SSLCertificateFile ${:cert_file}
SSLCertificateKeyFile ${:key_file}
</VirtualHost>
<VirtualHost ${:ip}:${:port4}>
#ServerName www.example.com
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory ${:dashboard_root}>
Options FollowSymLinks
AuthName "LAMP Service Dashboard"
AuthType Basic
AuthUserFile ${:dashboard_pwd}
require valid-user
</Directory>
DocumentRoot ${:dashboard_root}
DirectoryIndex index.html index.php DirectoryIndex index.html index.php
SSLEngine on
SSLCertificateFile ${:cert_file}
SSLCertificateKeyFile ${:key_file}
</VirtualHost> </VirtualHost>
...@@ -100,6 +137,10 @@ LoadModule unixd_module modules/mod_unixd.so ...@@ -100,6 +137,10 @@ LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_host_module modules/mod_authz_host.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule log_config_module modules/mod_log_config.so LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so LoadModule version_module modules/mod_version.so
...@@ -113,4 +154,5 @@ LoadModule rewrite_module modules/mod_rewrite.so ...@@ -113,4 +154,5 @@ LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so LoadModule php5_module modules/libphp5.so
LoadModule alias_module modules/mod_alias.so LoadModule alias_module modules/mod_alias.so
\ No newline at end of file LoadModule ssl_module modules/mod_ssl.so
\ No newline at end of file
var page = require('webpage').create();
var url = '${:content-url}';
page.open(url, function(status){
page.evaluate(function(){
function eventFire(el, etype){
if (el.fireEvent) {
(el.fireEvent('on' + etype));
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
}
}
eventFire(document.getElementById('start_button'),'click');
document.getElementsByName('ADMIN_USER_LOGIN')[0].setValue('${:user}');
document.getElementsByName('ADMIN_USER_NAME')[0].setValue('${:user}');
document.getElementsByName('ADMIN_USER_PASS')[0].setValue('${:password}');
document.getElementsByName('ADMIN_USER_PASS2')[0].setValue('${:password}');
document.getElementsByName('STORAGE_TYPE')[0].setValue('${:storage-type}');
var button = document.getElementById('save_button')
button.removeClassName('disabled');
eventFire(button,'click');
});
phantom.exit();
});
\ No newline at end of file
<?php
/**
* The base configurations of the Dashboard.
*
*/
define('PUBLIC_BACKEND_URL', '${:public_html_backend}');
define('PUBLIC_URL', '${:public_html}');
define('MYSQL_BACKEND_URL', '${:phpmyadmin_backend}');
define('MYSQL_URL', '${:phpmyadmin}');
define('FILE_BACKEND_URL', '${:filemanager_backend}');
define('FILE_URL', '${:filemanager}');
define('DB_USER', '${:mysql_username}');
define('DB_PASSWORD', '${:mysql_password}');
define('DB_NAME', '${:mysql_database}');
define('DB_HOST', '${:mysql_host}');
define('DB_PORT', '${:mysql_port}');
define('APACHE_ERROR_FILE', '${:apache_error_log}');
define('APACHE_ACCESS_FILE', '${:apache_access_log}');
define('WWW_FOLDER', '${:www_folder}');
define('UPLOAD_FOLDER', '${:upload_folder}');
define('JOOMLA_FOLDER', '${:joomla_folder}');
define('PRESTASHOP_FOLDER', '${:prestashop_folder}');
define('DRUPAL_FOLDER', '${:drupal_folder}');
define('WP_FOLDER', '${:wp_folder}');
<html>
<head>
<title>Empty Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h3>Hi, this website folder is still empty. Please go to your File Manager administration (filemanager-url) and
upload your files into ${:folder} folder.</h3>
</body>
</html>
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = '${:rand_pwd}'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '${:mysql_host}';
$cfg['Servers'][$i]['port'] = '${:mysql_port}';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>
\ No newline at end of file
var page = require('webpage').create();
var url = '${:content-url}'
page.open(url,function(status){
var form = page.evaluate(function(){
return document.getElementById('login_form');
});
if(form === null){
phantom.exit(1);
} else {
phantom.exit();
}
});
\ No newline at end of file
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