[ic] Apache Configuration Issues

Daniel Davenport ddavenport at newagedigital.com
Thu Jun 17 01:56:42 EDT 2004



> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org
> [mailto:interchange-users-bounces at icdevgroup.org]On Behalf Of Himem Inc
> Sent: Wednesday, June 16, 2004 1:37 PM
> To: interchange-users at icdevgroup.org
> Subject: [ic] Apache Configuration Issues
>
>
> I am running Interchange 5.2, Apache 2.4.  I installed Interchange on my
> domain http://ic.vtwireless.com/.  The initial page works, as do the
> search based pages, however any other page says that the page cannot be
> displayed.  Also if you goto /admin, it looks different (like the admin
> interface should), yet still says the page cannot be found.

I looked at the URL, and it didn't work for me.  Everything redirects to
/ic/, which pops me up a 'Forbidden' page that looks like Apache wrote it.
If you had included some information on your current configuration, i could
have been more helpful.  :)

BTW, for reference, an out-of-the-box Interchange doesn't appear to like
serving binary content like images.  If the site's pages have images and
such as that, redirecting everything into Interchange is a pretty bad idea.

If you have mod_rewrite, try this.

 RewriteEngine on

 # Assuming you have an alias from /interchange-5
 # to __IC_DIR__/share/interchange-5...
 # (The rule below doesn't look outside the DocumentRoot.)
 RewriteCond %{REQUEST_URI} !^/interchange-5

 # Interchange might spit out /cgi-bin/ links, or
 # you might want to use CGIs of your own.  Either way,
 # /cgi-bin is almost always an alias.  See above.
 RewriteCond %{REQUEST_URI} !^/cgi-bin

 # The file must not exist in the DocumentRoot
 RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

 RewriteRule ^/(.*)$ /cgi-bin/catalog/$1 [PT]

These lines will only rewrite a URI into Interchange if the resource is not
a CGI and doesn't exist within your DocumentRoot.  If the content does
exist, it'll be served without bothering Interchange.  The rule will also
disable effectively disable directory indexes outside of Interchange, but
that's really a good thing if you'll just be serving accessories (images,
flash, etc).

Note the first RewriteCond line, and the comment above it.  Because the last
RewriteCond only checks the DocumentRoot for files, aliases will look like
non-existent URIs.  You'll likely need a similar RewriteCond for each alias
you use.  Of course, since you can use mod_rewrite for aliases anyway, and
it's almost as simple and much more flexible than an Alias line, i'd
personally change the RewriteCond lines and make them into rules.  (At that
point, you should probably get rid of the [PT] in the last line.)

Make sure that /cgi-bin/catalog is in interchange.cfg as the name for the
link program, or change the rules accordingly.

If you want to make the rewriting transparent to the user, you might try
changing CGI_URL to blank.  It looks like it will work, but NOTE THAT I HAVE
NOT TESTED THIS, and i know a bit less about interchange than about apache.
The catalog will work ok without changing any variables--albeit with the
/cgi-bin/crap popping up in the url--so only change this if you can fix it
back when/if it breaks the admin UI.  (It shouldn't, but read this paragraph
again. :))

Another way would be to edit the VendURL line in catalog.cfg and remove
__CGI_URL__ from the end of the line.  This may be safer, if not the most
elegant fix.


> I was hoping to setup Interchange so that I would not need any extra
> unneccessary information in the url (eg,
> http://ic.vtwireless.com/cgi-bin/catalog/).

I was kinda bugged by the /cgi-bin/crap too, but never really cared enough
to do something about it.  Thanks for giving me an outside reason to find a
solution.  :)

<snippage>

/daniel

--
(Insert nifty sig line here)
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 5/18/2004



More information about the interchange-users mailing list