Новости | FAQ | Авторы | Документация | В действии | Библиотека |
Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
nkostya 03.05.2003 21:22 / 03.05.2003 21:48
Здравствуйте!@conf[filespec] $charsetsdir[/users/g/a/gammatravel.ru/html/www/cgi-bin/charsets] $sqldriversdir[/users/g/a/gammatravel.ru/html/www/cgi-bin/lib] $CHARSETS[ # $.koi8-r[$charsetsdir/koi8-r.cfg] # $.windows-1250[$charsetsdir/windows-1250.cfg] $.windows-1251[$charsetsdir/windows-1251.cfg] # $.windows-1257[$charsetsdir/windows-1257.cfg] ] #change your client libraries paths to those on your system $SQL[ $.drivers[^table::set{protocol driver client #mysql $sqldriversdir/libparser3mysql.so libmysqlclient.so #pgsql $sqldriversdir/libparser3pgsql.so libpq.so #oracle $sqldriversdir/libparser3oracle.so /u01/app/oracle/product/8.1.5/lib/libclntsh.so?ORACLE_HOME=/u01/app/oracle/product/8.1.5&ORA_NLS33=/u01/app/oracle/product/8.1.5/ocommon/nls/admin/data }] ] #for ^file::load[name;user-name] mime-type autodetection $MIME-TYPES[^table::set{ext mime-type zip application/zip doc application/msword xls application/vnd.ms-excel pdf application/pdf ppt application/powerpoint rtf application/rtf gif image/gif jpg image/jpeg png image/png tif image/tiff html text/html htm text/html txt text/plain mts application/metastream mid audio/midi midi audio/midi mp3 audio/mpeg ram audio/x-pn-realaudio rpm audio/x-pn-realaudio-plugin ra audio/x-realaudio wav audio/x-wav au audio/basic mpg video/mpeg avi video/x-msvideo mov video/quicktime swf application/x-shockwave-flash }] $LIMITS[ $.post_max_size(10*0x400*0x400) ] @fatal_error[title;body] $response:status(500) $response:content-type[ $.value[text/html] $.charset[$response:charset] ] <html> <head><title>$title</title></head> <body> <H1>$title</H1> $body #for [x] MSIE friendly ^for[i](0;512/8){<!-- -->} </body> @unhandled_exception_debug[exception;stack] ^fatal_error[Unhandled Exception (Debug); <pre>^untaint[html]{$exception.comment}</pre> ^if(def $exception.source){ <b>$exception.source</b><br> <pre>^untaint[html]{$exception.file^($exception.lineno^)}</pre> } ^if(def $exception.type){exception.type=$exception.type} ^if($stack){ <hr> ^stack.menu{ <tt>$stack.name</tt> $stack.file^($stack.lineno^)<br> } } ] @unhandled_exception_release[exception;stack] ^fatal_error[Unhandled Exception; <p>The server encountered an unhandled exception and was unable to complete your request.</p> <p>Please contact the server administrator, $env:SERVER_ADMIN and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the Parser error log or in debug version of unhandled_exception.</p> ] @unhandled_exception[exception;stack] ^unhandled_exception_release[$exception;$stack] @auto[] #source/client charsets $request:charset[windows-1251] $response:charset[windows-1251] $response:content-type[ $.value[text/html] $.charset[$response:charset] ] #$SQL.connect-string[mysql://user:pass@host/db?charset=cp1251_koi8] #$SQL.connect-string[pgsql://user:pass@host/db] #$SQL.connect-string[oracle://user:pass@service?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS].htaccess в /html/www/
DirectoryIndex index.html # назначение обработчиком .html страниц: #AddHandler parsed-html html #Action parsed-html /cgi-bin/parser3.cgi # запрет на доступ к .cfg и .p файлам: <Files ~ "\.(p|cfg)$"> Order allow,deny Deny from all </Files>Права:
/html - 755 /html/www - 750 /html/www/*.html - 644 /html/www/cgi-bin - 710 /html/www/cgi-bin/ parser3.cgi - 700 auto.p -700 charsets - 700 or 640 (и так и так пробывал) lib - 700 or 640 /html/www/cgi-bin/charsets/*.p - 600