<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Static IP Access]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6512&amp;type=atom" />
	<updated>2016-10-12T02:27:55Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6512</id>
		<entry>
			<title type="html"><![CDATA[Re: Static IP Access]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26588#p26588" />
			<content type="html"><![CDATA[<p>An Apache vhosts conf file would prevent .htaccess files being compromised. Most standard OpenVZ and other templates provide examples of such configs.</p><p>Here is one from a Debian FA apache conf where the rewrite conditions above be inserted:<br /></p><div class="codebox"><pre><code>ServerAdmin webmaster@localhost
ServerSignature Off
ServerTokens Prod

&lt;IfModule mpm_prefork_module&gt;
    StartServers 2
    MinSpareServers 1 
    MaxSpareServers 2
    MaxClients          50
    MaxRequestsPerChild 100
&lt;/IfModule&gt;

&lt;VirtualHost *:80&gt;

DocumentRoot /var/www/frontac

&lt;Directory /&gt;
        Options FollowSymLinks
        AllowOverride None
&lt;/Directory&gt;

&lt;Directory /var/www/frontac&gt;
        Options FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
        DirectoryIndex index.php index.html
&lt;/Directory&gt;

### Will possibly affect any other php script in it 
# &lt;Directory /var/www/frontac/sql/&gt;
#   Order Deny,Allow
#   Deny from All
# &lt;/Directory&gt;

&lt;IfModule mod_rewrite.c&gt;
        &lt;Location /modules/api/&gt;
                Options -MultiViews
                RewriteEngine on
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteRule ^ index.php [QSA,L]
        &lt;/Location&gt;
&lt;/IfModule&gt;

# Protect sensitive files.
&lt;FilesMatch &quot;\.(inc|po|sh|.*sql|log)$&quot;&gt;
    Order allow,deny
    Deny from All
    Satisfy All
&lt;/FilesMatch&gt;

# Disable directory listings.
Options -Indexes

# Set the default index.
DirectoryIndex index.php

&lt;IfModule mod_php5.c&gt;
    php_flag magic_quotes_gpc Off
    php_flag register_globals Off
    php_flag session.use_trans_sid Off
&lt;/IfModule&gt;

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

&lt;/VirtualHost&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2016-10-12T02:27:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26588#p26588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Static IP Access]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26582#p26582" />
			<content type="html"><![CDATA[<p>Something like this in a .htaccess file, assuming you&#039;re using Apache.</p><div class="codebox"><pre><code>Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/noway.html$
RewriteCond %{REMOTE_ADDR} !=123.45.67.89
RewriteRule $ /noway.html [R=301,L]</code></pre></div><p>or you could add an iptables firewall rule, again if its a linux box.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2016-10-11T15:46:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26582#p26582</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Static IP Access]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26574#p26574" />
			<content type="html"><![CDATA[<p>Is it possible to restrict Frontaccounting access from a Static IP Address?</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2016-10-11T08:37:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26574#p26574</id>
		</entry>
</feed>
