[ic] Time for new hardware?

Josh Lavin jlavin at endpoint.com
Wed Sep 21 16:33:49 UTC 2016


Quoting Jon Jensen (jon at endpoint.com):
> On Wed, 21 Sep 2016, Grant wrote:
> 
> > > > > We are using Nginx + FastCGI to connect to Interchange in
> > > > > most of our installations now.
> > 
> > Should I be able to have URLs like example.com/page.html without any
> > folders between the domain and page?
> 
> You can do that now, using classic CGI vlink and mod_rewrite.
> 
> I don't recommend it, though, because it means *every* bot and 404 request
> goes through Interchange rather than being served statically by Apache,
> greatly increasing the load on Interchange and your server.

Right -- I may have posted this to the list once before, but here's what
I have typically used to avoid that, and only send to IC the requests it
would normally handle:


# Here is how I do a catalog at the root URL. This method prevents
# Interchange from having to handle all 404 requests, unless the request
# does not have an extension, or is a known file type that IC serves.
    
ScriptAlias /cgi-bin/ /home/mysite/cgi-bin/

RewriteEngine On
 
RewriteRule ^/index(\.html?)?$  /  [R=301]
RewriteRule ^/?$  /cgi-bin/mysite/index  [L,NS,PT]
 
RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d  [OR]
RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f
RewriteRule  ^  -  [L,NS]
 
RewriteCond  %{REQUEST_FILENAME}  \.
RewriteCond  %{REQUEST_FILENAME}  !\.(?:html|txt|xml|pdf|iif)$
RewriteRule  ^  -  [L,NS]
 
RewriteCond  %{REQUEST_FILENAME}  !^/cgi-bin/.+
RewriteRule  ^(.+)$  /cgi-bin/mysite$1  [L,NS,PT]


https://github.com/jdigory/interchange-extras/blob/master/eg/httpd-example.conf

-- 
Josh Lavin
End Point Corporation



More information about the interchange-users mailing list