From 8f0324d0cc734afd65ba1a00e940fd77688fcb99 Mon Sep 17 00:00:00 2001
From: pjotrp
Date: Sat, 17 Dec 2022 11:32:53 -0600
Subject: Parametrize GN1
---
gn/services/gn1-httpd-config.scm | 41 ++++++++++++++++++++++++++++++----------
1 file changed, 31 insertions(+), 10 deletions(-)
diff --git a/gn/services/gn1-httpd-config.scm b/gn/services/gn1-httpd-config.scm
index fdc5f71..c785ca6 100644
--- a/gn/services/gn1-httpd-config.scm
+++ b/gn/services/gn1-httpd-config.scm
@@ -1,6 +1,7 @@
(define-module (gn services gn1-httpd-config)
#:export (%default-httpd22-modules
GN1-httpd-config-prod
+ GN1-httpd-config-test
))
(use-modules (gnu)
@@ -64,10 +65,9 @@
("rewrite_module" "modules/mod_rewrite.so"))))
(define (GN1-httpd-config gn1-user cwd url gn1-port)
- (let* ((gn1-source cwd)
- (gn1-server url))
+ (let* ((gn1-source cwd))
(httpd-config-file
- (server-name gn1-server)
+ (server-name url)
;; Defaults to httpd, should be same as 'package' above to launch service.
(server-root httpd22-with-mod-python)
(user gn1-user)
@@ -88,26 +88,40 @@ PythonPath \"sys.path+['/run/current-system/profile/lib/python2.4', '/run/curren
# same as 'listen' above
NameVirtualHost *:" gn1-port "
- DocumentRoot "gn1-source "/web/
- Alias /images "gn1-source "/web/images/
- Alias /javascript "gn1-source "/web/javascript/
- Alias /css "gn1-source "/web/css/
-
+ DocumentRoot " gn1-source "/web/
+ Alias /images " gn1-source "/web/images/
+ Alias /javascript " gn1-source "/web/javascript/
+ Alias /css " gn1-source "/web/css/
+
AllowOverride None
Order allow,deny
Allow from all
-
+
AllowOverride None
Order allow,deny
Allow from all
-
+
AllowOverride None
Order allow,deny
Allow from all
+
+# CUSTOM: Add PHP 5 parsing (via CGI) handler and action
+ScriptAlias /local-bin /run/current-system/profile/bin
+AddHandler application/x-httpd-php5 php html htm
+Action application/x-httpd-php5 /local-bin/php-cgi
+
+SetEnv PHP_INI_SCAN_DIR " gn1-source "
+
+
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+
+
#what is the difference between these two?
AddHandler mod_python .py
@@ -133,3 +147,10 @@ NameVirtualHost *:" gn1-port "
"gn1.genenetwork.org"
"8042"
))
+
+(define GN1-httpd-config-test
+ (GN1-httpd-config "gn1"
+ "/home/gn1/production/gnshare/gn-pjotr-test"
+ "gn1-pjotr.genenetwork.org"
+ "8044"
+ ))
--
cgit v1.2.3