Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Post installation instructions from external app installed on Lamp App suggest Apache config changes

    LAMP
    3
    4
    176
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Shai
      Shai last edited by Shai

      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 running

      ln -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.)

      robi girish 2 Replies Last reply Reply Quote 0
      • robi
        robi @Shai last edited by

        @shai Yes, that should do.

        Life of Gratitude.
        Life of Advanced Technology

        1 Reply Last reply Reply Quote 1
        • girish
          girish Staff @Shai last edited by girish

          @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>
          
          
          Shai 1 Reply Last reply Reply Quote 0
          • Shai
            Shai @girish last edited by

            @girish Thank you!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB