Installing Parser on web-server as CGI

To install Parser, one should make changes to server's main configuration file. If you are not authorized to make such changes, you should be able to use .htaccess files.

By default, Apache has usage of
.htaccess disabled.
You will need to enable it (at least allow specifying
FileInfo) by adding directives to server's configuration file (usually httpd.conf), inside <virtualhost > section allotted to your site or outside it-for all sites:

<Directory
 /path/to/your/web/space>
AllowOverride
 FileInfo
</Directory>


Place Parser's executable file (in current version, parser3.cgi) into your CGI scripts directory (if you upload it using ftp you must do it in binary mode) and set necessary rights (ask your hosting provider for details, but usually it's-755).

Under UNIX:
Add these blocks to your
.htaccess file (or httpd.conf-inside <virtualhost > section allotted for your site or outside it-for all sites):

Action parser3-handler /cgi-bin/parser3.cgi
AddHandler
parser3-handler html

deny access to .p files, mainly: auto.p
<Files
~ "\.p$">
Order allow,deny
Deny from all
</Files>

Under Windows:
Add these blocks to your
.htaccess file (or httpd.conf-inside <virtualhost > section allotted for your site or outside it-for all sites):

Action parser3-handler /cgi-bin/parser3.exe
AddHandler
parser3-handler html

deny access to .p files, mainly: auto.p
<Files
~ "\.p$">
Order allow,deny
Deny from all
</Files>

If you would rather change implicit configuration file (see "Installing and configuring Parser") location, you can explicitly specify it :

# assign environment variable containing path to auto.p
SetEnv
CGI_PARSER_CONFIG /path/to/file/auto.p

Note: In this case, you will need Apache module
mod_env, which is, however, installed by default.

Parser makes records about errors to error log file
parser3.log, which is implicitly located in the same directory where parser3 CGI script is. If Parser is not allowed to write to that file, errors are reported to standard error stream and are recorded in web-server error log file. If you would rather change implicit location of parser3.log, you can explicitly specify it.

# assign environment variable containing path to parser3.log
SetEnv
CGI_PARSER_LOG /path/to/file/parser3.log

Note: In this case, you will need Apache module mod_env, which is, however, installed by default.


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 01.11.2013