snipt

Ctrl+h for KB shortcuts

Nginx configuration file

Backbone.js rewrite for Nginx

1
2
3
4
5
        location / {
        		if (!-e $request_filename){
        			rewrite ^(.*)$ /index.html break;
        		}
        }
https://snipt.net/embed/ab9ed4a5f3702f4c11307dd1f510415f/
https://snipt.net/raw/ab9ed4a5f3702f4c11307dd1f510415f/
ab9ed4a5f3702f4c11307dd1f510415f
nginx
Nginx configuration file
5
2016-09-25T19:28:05
True
False
False
Apr 30, 2013 at 08:22 PM
/api/public/snipt/60379/
backbonejs-rewrite-for-nginx
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a> <span class="k">location</span> <span class="s">/</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="kn">if</span> <span class="s">(!-e</span> <span class="nv">$request_filename</span><span class="s">)</span><span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="kn">rewrite</span> <span class="s">^(.*)</span>$ <span class="s">/index.html</span> <span class="s">break</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">}</span> </span><span id="L-5"><a name="L-5"></a> <span class="p">}</span> </span></pre></div> </td></tr></table>
backbone.js, nginx, rewrite, rewrites

Text only

PHP5 Nginx Install

apt-get install php5-fpm php5-cgi php5-common php5-suhosin php-apc php5-mysql php5-dev php5-curl php5-gd php5-imagick php5-mcrypt php5-snmp
https://snipt.net/embed/6ecfe0411556bdc168a244e4889245ed/
https://snipt.net/raw/6ecfe0411556bdc168a244e4889245ed/
6ecfe0411556bdc168a244e4889245ed
text
Text only
1
2016-09-21T18:24:13
True
False
False
Aug 06, 2012 at 01:46 PM
/api/public/snipt/45260/
php5-nginx-install
<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 id="L-1"><a name="L-1"></a>apt-get install php5-fpm php5-cgi php5-common php5-suhosin php-apc php5-mysql php5-dev php5-curl php5-gd php5-imagick php5-mcrypt php5-snmp </span></pre></div> </td></tr></table>
nginx
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.