mastostart-gnu: Refattorizza configurazione Apache.

* mastostart-gnu/system/mastostart.scm: Definisce nuove variabili
  esterne alla configurazione di sistema.
This commit is contained in:
Giacomo Leidi 2020-05-10 20:48:56 +02:00
parent dd46539c94
commit 4b7d617abe

View file

@ -15,8 +15,23 @@
ssh
web)
(define-public %apache-listen-ports '("8080"))
(define-public %apache-server-name "127.0.0.1")
(define-public %apache-webroot "/srv")
(define-public %apache-conf
(string-append "
<Directory \"" %apache-webroot "\">
Options FollowSymLinks
AllowOverride All
</Directory>
<FilesMatch \\.php$>
SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\"
</FilesMatch>"))
(define-public mastostart-conf
(operating-system
(locale "it_IT.utf8")
@ -69,8 +84,8 @@
(httpd-configuration
(config
(httpd-config-file
(server-name "127.0.0.1")
(listen '("8080"))
(server-name %apache-server-name)
(listen %apache-listen-ports)
(document-root %apache-webroot)
(modules (cons*
(httpd-module
@ -83,14 +98,7 @@
(name "proxy_fcgi_module")
(file "modules/mod_proxy_fcgi.so"))
%default-httpd-modules))
(extra-config (list "\
<Directory \"/exchange\">
AllowOverride All
</Directory>
<FilesMatch \\.php$>
SetHandler \"proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/\"
</FilesMatch>"))))))
(extra-config (list %apache-conf))))))
(service php-fpm-service-type
(php-fpm-configuration