[med-svn] [openemr] 01/01: Reworking of Apache configuration and correcting of dir perms for install. (Pre|Post)inst/rm scripts are still not fixed. Package will install and you can enable Apache configuration with 'a2enconf openemr'.

Ian Wallace iankarlwallace-guest at moszumanska.debian.org
Sun Jun 15 03:19:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

iankarlwallace-guest pushed a commit to branch master
in repository openemr.

commit 95cff60c93d44e49bea1afe26fac2b7feaaf8aad
Author: Ian Wallace <iankarlwallace at gmail.com>
Date:   Fri Jun 13 20:42:55 2014 -0700

    Reworking of Apache configuration and correcting of dir perms for install.  (Pre|Post)inst/rm scripts are still not fixed.  Package will install and you can enable Apache configuration with 'a2enconf openemr'.
---
 debian/apache.conf             | 51 +++++++++++++++++++++++++++++++++
 debian/dirs                    |  4 ++-
 debian/install                 |  5 ++--
 debian/openemr-apache-ssl.conf | 64 ------------------------------------------
 debian/openemr-apache.conf     | 40 --------------------------
 debian/openemr.links           |  7 +++--
 debian/postinst                | 16 +++++++++++
 debian/rules                   |  4 +++
 8 files changed, 82 insertions(+), 109 deletions(-)

diff --git a/debian/apache.conf b/debian/apache.conf
new file mode 100644
index 0000000..596917d
--- /dev/null
+++ b/debian/apache.conf
@@ -0,0 +1,51 @@
+# OpenEMR default Apache configuration
+
+Alias /openemr /usr/share/openemr
+
+<Directory /usr/share/openemr>
+	Options Indexes FollowSymLinks MultiViews
+	DirectoryIndex index.php
+	AllowOverride None
+	Require all granted
+	Order allow,deny
+	Allow from all
+
+	<IfModule mod_php5.c>
+		AddType application/x-httpd-php .php
+
+		php_flag magic_quotes_gpc Off
+		php_flag track_vars On
+		php_flag register_globals Off
+		php_admin_flag allow_url_fopen Off
+		php_value include_path .
+		php_value post_max_size 32M
+		php_value upload_max_filesize 16M
+		php_admin_value upload_tmp_dir /var/lib/openemr/tmp
+		php_admin_value open_basedir /usr/share/openemr/:/etc/openemr/:/var/lib/openemr/
+	</IfModule>
+</Directory>
+
+# Authorize for setup
+<Directory /usr/share/openemr/setup>
+	<IfModule mod_authn_file.c>
+		AuthType Basic
+		AuthName "OpenEMR Setup"
+		AuthUserFile /etc/phpmyadmin/htpasswd.setup
+	</IfModule>
+	Require valid-user
+</Directory>
+
+# Pt Info Dirs that must be secured:
+<Directory /var/lib/openemr/sites/*/documents>
+	Order deny,allow
+	Deny from all
+</Directory>
+<Directory /var/lib/openemr/sites/*/edi>
+	Order deny,allow
+	Deny from all
+</Directory>
+<Directory /var/lib/openemr/sites/*/era>
+	Order deny,allow
+	Deny from all
+</Directory>
+
diff --git a/debian/dirs b/debian/dirs
index 5c3a63a..0104739 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -1,3 +1,5 @@
-etc/openemr/conf.d
+etc/openemr
 var/log/openemr
 var/lib/openemr/gacl/admin/templates_c
+var/lib/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled 
+var/lib/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache 
diff --git a/debian/install b/debian/install
index d2a5b8a..17a8324 100644
--- a/debian/install
+++ b/debian/install
@@ -12,6 +12,7 @@ controller.php								usr/share/openemr
 controllers										usr/share/openemr
 custom												usr/share/openemr
 DocumentTreeMenu.js						usr/share/openemr
+gacl													usr/share/openemr
 images												usr/share/openemr
 includes											usr/share/openemr
 index.php											usr/share/openemr
@@ -29,6 +30,6 @@ sql_upgrade.php								usr/share/openemr
 templates											usr/share/openemr
 version.php										usr/share/openemr
 
-gacl													usr/share/openemr
-
 sites													var/lib/openemr
+
+debian/apache.conf						etc/openemr
diff --git a/debian/openemr-apache-ssl.conf b/debian/openemr-apache-ssl.conf
deleted file mode 100644
index 5c3ff8c..0000000
--- a/debian/openemr-apache-ssl.conf
+++ /dev/null
@@ -1,64 +0,0 @@
-<IfModule mod_ssl.c>
-<VirtualHost _default_:443>
-	ServerName  localhost
-	ServerAdmin webmaster at localhost
-
-        DocumentRoot /usr/share/openemr
-        <Directory />
-                Options FollowSymLinks
-                AllowOverride None
-		Require all granted
-        </Directory>
-        <Directory /usr/share/openemr>
-                Options Indexes FollowSymLinks MultiViews
-                AllowOverride None
-		Require all granted
-                Order allow,deny
-                allow from all
-        </Directory>
-
-	# Pt Info Dirs that must be secured:
-        <Directory /var/www/openemr/sites/*/documents>
-                order deny,allow
-                Deny from all
-        </Directory>
-        <Directory /var/www/openemr/sites/*/edi>
-                order deny,allow
-                Deny from all
-        </Directory>
-        <Directory /var/www/openemr/sites/*/era>
-                order deny,allow
-                Deny from all
-        </Directory>
-
-
-	# This is to log all the POST data and the response so that we can see
-        # what's happening with AJAX
-	# DumpIOInput on
-	# DumpIOLogLevel notice
-	# DumpIOOutput off
-
-        ErrorLog /var/log/apache2/openemr-error-ssl.log
-
-        # Possible values include: debug, info, notice, warn, error, crit,
-        # alert, emerg.
-        LogLevel notice
-
-        CustomLog /var/log/apache2/openemr-access-ssl.log combined
-
-	SSLEngine on
-	SSLCertificateFile    /etc/ssl/certs/localhost.crt
-	SSLCertificateKeyFile /etc/ssl/private/localhost.key
-
-	<FilesMatch "\.(cgi|shtml|phtml|php)$">
-		SSLOptions +StdEnvVars
-	</FilesMatch>
-
-	BrowserMatch "MSIE [2-6]" \
-		nokeepalive ssl-unclean-shutdown \
-		downgrade-1.0 force-response-1.0
-	# MSIE 7 and newer should be able to use keepalive
-	BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
-
-</VirtualHost>
-</IfModule>
diff --git a/debian/openemr-apache.conf b/debian/openemr-apache.conf
deleted file mode 100644
index ba78e13..0000000
--- a/debian/openemr-apache.conf
+++ /dev/null
@@ -1,40 +0,0 @@
-<VirtualHost *:80>
-	ServerName localhost
-	ServerAdmin webmaster at localhost
-
-	DocumentRoot /usr/share/openemr
-	<Directory />
-		Options FollowSymLinks
-		AllowOverride None
-		Require all granted
-	</Directory>
-	<Directory /usr/share/openmer>
-		Options Indexes FollowSymLinks MultiViews
-		AllowOverride None
-		Require all granted
-		Order allow,deny
-		allow from all
-	</Directory>
-
-	# Pt Info Dirs that must be secured:
-	<Directory /var/www/openemr/sites/*/documents>
-		order deny,allow
-		Deny from all
-	</Directory>
-	<Directory /var/www/openemr/sites/*/edi>
-		order deny,allow
-		Deny from all
-	</Directory>
-	<Directory /var/www/openemr/sites/*/era>
-		order deny,allow
-		Deny from all
-	</Directory>
-
-	ErrorLog /var/log/apache2/openemr-error.log
-
-	# Possible values include: debug, info, notice, warn, error, crit,
-	# alert, emerg.
-	LogLevel warn
-
-	CustomLog /var/log/apache2/openemr-access.log combined
-</VirtualHost>
diff --git a/debian/openemr.links b/debian/openemr.links
index 082b577..f6f2775 100644
--- a/debian/openemr.links
+++ b/debian/openemr.links
@@ -1,2 +1,5 @@
-/var/lib/openemr/sites										/usr/share/openemr/sites
-/var/lib/openemr/gacl/admin/templates_c   /usr/share/openemr/gacl/admin/templates_c
+/etc/openemr/apache.conf /etc/apache2/conf-available/openemr.conf
+/var/lib/openemr/sites /usr/share/openemr/sites
+/var/lib/openemr/gacl/admin/templates_c /usr/share/openemr/gacl/admin/templates_c
+/var/lib/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled /usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
+/var/lib/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache /usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
diff --git a/debian/postinst b/debian/postinst
index 8ba0102..314cea4 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -44,6 +44,22 @@
 # Source debconf library.
 . /usr/share/debconf/confmodule
 
+function unsecure-file {
+		chown www-data:www-data $1
+			chmod 660 $1
+}
+
+unsecure-file /var/lib/openemr/sites/default/sqlconf.php
+unsecure-file /var/lib/openemr/sites/default/documents
+unsecure-file /var/lib/openemr/sites/default/edi
+unsecure-file /var/lib/openemr/sites/default/era
+unsecure-file /var/lib/openemr/sites/default/letter_templates
+unsecure-file /var/lib/openemr/gacl/admin/templates_c
+unsecure-file /var/lib/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
+unsecure-file /var/lib/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
+
+exit 0
+
 case "$1" in
    configure)
 
diff --git a/debian/rules b/debian/rules
index f542449..b24c5d3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,4 +22,8 @@ override_dh_link:
 	# Originally these were placed so the empty templates_c dir wouldn't be pruned but we create a link for it to /var/lib/openemr/gacl ...
 	rm    debian/openemr/usr/share/openemr/gacl/admin/templates_c/README
 	rmdir debian/openemr/usr/share/openemr/gacl/admin/templates_c
+	rm    debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache/README
+	rmdir debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
+	rm    debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled/README
+	rmdir debian/openemr/usr/share/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
 	dh_link

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/openemr.git



More information about the debian-med-commit mailing list