Archive

Posts Tagged ‘CGI’

Gnu Cgicc Library compiles on Mac OS X 10.5.6!

March 9th, 2009 No comments

Although not officially tested for the Mac, I got version 3.2.7 to compile (3.2.8 had compiler errors).  Here’s what I did:

  1. Remove “#pragma interface” and “#pramga implementation” from all source files
  2. In Terminal, change to the cgicc directory
  3. ./configure –prefix=/Path/where/you/want/to/install
  4. sudo make install
Categories: Mac Tags: , ,

Accessing documents outside the web root in Apache using mod_rewrite

March 2nd, 2009 No comments

I’ve been wanting to keep a CGI script outside my web root (for security), but still serve it on my site.

The problem:

  • I’m on a shared host, so I have no access to the server config files (if I did, an ScriptAlias directive would be the move)
  • RewriteRule directives in .htaccess files will not serve documents outside the web root
  • SSI is not implemented correctly on my server (actually running litespeed), and is recommended for small code insertions anyway.

After days of mailing list and forum posts, always seeming right on the edge of success… Arrrggghhhh!!!!

The solution?

  • Put a symbolic link to the script (which does not contain any of the sensitive data) in the directory with the .htaccess file
  • In .htaccess:
    • Options +SymLinksIfOwnerMatch # tells Apache to follow the link
    • RewriteEngine on # enable URL processing via mod_rewrite
    • RewriteRule ^(.*)$ scriptname?$1 [T=application/x-httpd-cgi] # pass the path_info requested (everything after the hostname) as a query string to the CGI; and handle it as a CGI script (T=…)

And, voila: script outside web root served!

I hope this saves someone else the frustration!

p.s. the minimum permissions to make this setup work are:

  • Script, link and .htaccess: 604
  • Script directory: 701
Categories: Web Development Tags: , ,

windows 7 product key

windows 7 product key

windows 7 key generator

windows 7 key generator

free winrar download

free winrar download

winzip activation code

winzip activation code

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

winrar download free

winrar download free

winzip free download full version

winzip free download full version

windows 7 activation crack

windows7 activation crack

windows 7 crack

windows 7 crack

free winzip

free winzip
\n