Skip to content

Commit

Permalink
flexible apache recs to secure multiple sites
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Aug 5, 2012
1 parent 8588816 commit 32bb33b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ value that will work on your system.

Step 6 gives instructions on configuring the Apache web server. We suggest
you print these instructions for future reference. Instructions are given to
secure the "openemrwebroot/sites/default/documents",
"openemrwebroot/sites/default/edi" and "openemrwebroot/sites/default/era"
secure the "openemrwebroot/sites/*/documents",
"openemrwebroot/sites/*/edi" and "openemrwebroot/sites/*/era"
directories, which contain patient information. This can
be done be either placing pertinent .htaccess files in these directories
or by editing the apache configuration file. The location of the apache
Expand All @@ -205,15 +205,15 @@ In windows, the XAMPP 1.7.0 package places the configuration file at
xampp\apache\conf\httpd.conf. To secure the /documents, /edi and /era
directories you can paste following to the end of the apache configuration
file (ensure you put full path to directories):
<Directory "openemrwebroot/sites/default/documents">
<Directory "openemrwebroot/sites/*/documents">
order deny,allow
Deny from all
</Directory>
<Directory "openemrwebroot/sites/default/edi">
<Directory "openemrwebroot/sites/*/edi">
order deny,allow
Deny from all
</Directory>
<Directory "openemrwebroot/sites/default/era">
<Directory "openemrwebroot/sites/*/era">
order deny,allow
Deny from all
</Directory>
Expand Down
8 changes: 4 additions & 4 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,18 +545,18 @@ function cloneClicked() {
case 6:
echo "<b>Step $state</b><br><br>\n";
echo "Configuration of Apache web server...<br><br>\n";
echo "The \"".realpath($docsDirectory)."\", \"".realpath($billingDirectory)."\" and \"".realpath($billingDirectory2)."\" directories contain patient information, and
echo "The \"".preg_replace("/${site_id}/","*",realpath($docsDirectory))."\", \"".preg_replace("/${site_id}/","*",realpath($billingDirectory))."\" and \"".preg_replace("/${site_id}/","*",realpath($billingDirectory2))."\" directories contain patient information, and
it is important to secure these directories. This can be done by placing pertinent .htaccess
files in these directories or by pasting the below to end of your apache configuration file:<br>
&nbsp;&nbsp;&lt;Directory ".realpath($docsDirectory)."&gt;<br>
&nbsp;&nbsp;&lt;Directory ".preg_replace("/${site_id}/","*",realpath($docsDirectory))."&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;order deny,allow<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deny from all<br>
&nbsp;&nbsp;&lt;/Directory&gt;<br>
&nbsp;&nbsp;&lt;Directory ".realpath($billingDirectory)."&gt;<br>
&nbsp;&nbsp;&lt;Directory ".preg_replace("/${site_id}/","*",realpath($billingDirectory))."&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;order deny,allow<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deny from all<br>
&nbsp;&nbsp;&lt;/Directory&gt;<br>
&nbsp;&nbsp;&lt;Directory ".realpath($billingDirectory2)."&gt;<br>
&nbsp;&nbsp;&lt;Directory ".preg_replace("/${site_id}/","*",realpath($billingDirectory2))."&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;order deny,allow<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deny from all<br>
&nbsp;&nbsp;&lt;/Directory&gt;<br><br>";
Expand Down

0 comments on commit 32bb33b

Please sign in to comment.