Post installation instructions from external app installed on Lamp App suggest Apache config changes
-
I just installed the open source app OpenEMR (an electronic medical records application) using Cloudron's Lamp App.
Set-up note: I symlinked
/app/data/public
to the OpenEMR root directory by runningln -s /app/data/openemr /app/data/public
After a successful installation, the following post-install message appeared,
The "/app/data/openemr/sites/*/documents" directory contain patient information, and it is important to secure these directories. Additionally, some settings are required for the Zend Framework to work in OpenEMR. This can be done by pasting the below to end of your apache configuration file:
<Directory "/app/data/openemr"> AllowOverride FileInfo Require all granted </Directory> <Directory "/app/data/openemr/sites"> AllowOverride None </Directory> <Directory "/app/data/openemr/sites/*/documents"> Require all denied </Directory>
My current
/app/data/apache/app.conf
looks like this (I have made NO changes to what Cloudron created):ServerName %{HTTP_HOST} <VirtualHost *:80> DocumentRoot /app/data/public LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy CustomLog "|/bin/cat" proxy ErrorLog "|/bin/cat" <Directory /app/data/public> Options +FollowSymLinks AllowOverride All Require all granted </Directory> # Do not remove this include. It's required for your app to see the Real IP Include "/app/code/apache/rpaf.conf" # This line can be commented out, if you do no require PHPMyAdmin Access Include "/app/code/apache/phpmyadmin.conf" </VirtualHost>
Question: do I just add the recommended apache directives at the end of
/app/data/apache/app.conf
as recommended?(I'm sorry if this is such a "duh" question. Frankly it was my struggles and ultimate headbanging configuring apache that had me searching for a better way and finding Cloudron. I have about 15 apps installed and I've never had to fuss with apache previously. Thanks for your patience.)
-
@shai You should remove the
/app/data/public
symlink and just change DocumentRoot instead (see below). And in apache.conf, remove the below:<Directory /app/data/public> Options +FollowSymLinks AllowOverride All Require all granted </Directory>
And replace the above with the Directory setting suggested by openemr. So, finally, I think you have:
ServerName %{HTTP_HOST} <VirtualHost *:80> DocumentRoot /app/data/openemr LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy CustomLog "|/bin/cat" proxy ErrorLog "|/bin/cat" <Directory "/app/data/openemr"> AllowOverride FileInfo Require all granted </Directory> <Directory "/app/data/openemr/sites"> AllowOverride None </Directory> <Directory "/app/data/openemr/sites/*/documents"> Require all denied </Directory> # Do not remove this include. It's required for your app to see the Real IP Include "/app/code/apache/rpaf.conf" # This line can be commented out, if you do no require PHPMyAdmin Access Include "/app/code/apache/phpmyadmin.conf" </VirtualHost>