snipt

Ctrl+h for KB shortcuts

Text only

Rackspace error reporting

php_flag display_errors on
https://snipt.net/embed/0e73eb9e033b08ce6f70a11cca6480b6/
/raw/0e73eb9e033b08ce6f70a11cca6480b6/
0e73eb9e033b08ce6f70a11cca6480b6
text
Text only
1
2019-07-11T19:03:38
True
False
False
/api/public/snipt/7635/
rackspace-error-reporting
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>php_flag display_errors on </span></pre></div> </td></tr></table>
"error reporting", htaccess, php, server

ApacheConf

Maintainace. Redirect all users except yourself to a maintainance page

1
2
3
4
RewriteEngine on
RewriteCond %{REQUEST_URI} !/upgrade.html$
RewriteCond %{REMOTE_HOST} !^123\.456\.789\.10
RewriteRule $ http://www.website.com/upgrade.html [R=302,L]
https://snipt.net/embed/dd10b95a4d7aa36901f1eca414056ed2/
/raw/dd10b95a4d7aa36901f1eca414056ed2/
dd10b95a4d7aa36901f1eca414056ed2
apacheconf
ApacheConf
5
2019-07-13T16:24:28
True
False
False
/api/public/snipt/7365/
maintainace-redirect-all-users-except-yourself-to-a-maintainance-page
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">RewriteEngine</span> <span class="k">on</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">RewriteCond</span> %{REQUEST_URI} !/upgrade.html$ </span><span id="L-3"><a name="L-3"></a><span class="nb">RewriteCond</span> %{REMOTE_HOST} !^123\.456\.789\.10 </span><span id="L-4"><a name="L-4"></a><span class="nb">RewriteRule</span> $ http://www.website.com/upgrade.html [R=302,L] </span></pre></div> </td></tr></table>
apache, htaccess

ApacheConf

Force SSL on Apache2

1
2
3
4
5
6
# Force all connections to this host/virtualhost to be over SSL.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
https://snipt.net/embed/21c3d5afa59eed078c537290f7a905a1/
/raw/21c3d5afa59eed078c537290f7a905a1/
21c3d5afa59eed078c537290f7a905a1
apacheconf
ApacheConf
6
2019-07-15T11:56:36
True
False
False
/api/public/snipt/7222/
force-ssl-on-apache2
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c"># Force all connections to this host/virtualhost to be over SSL.</span> </span><span id="L-2"><a name="L-2"></a><span class="nt">&lt;IfModule</span> <span class="s">mod_rewrite.c</span><span class="nt">&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="nb">RewriteEngine</span> <span class="k">On</span> </span><span id="L-4"><a name="L-4"></a><span class="nb">RewriteCond</span> %{HTTPS} <span class="k">off</span> </span><span id="L-5"><a name="L-5"></a><span class="nb">RewriteRule</span> (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </span><span id="L-6"><a name="L-6"></a><span class="nt">&lt;/IfModule&gt;</span> </span></pre></div> </td></tr></table>
apache2, apacheconf, htaccess