Tuesday, August 26, 2008

OTRS on windows

Today I setup OTRS on a windows server. It's always fun to work with systems designed specifically for *NIX but ported over to be usable on win32 systems.

In all actuality, things went fine and wasn't too difficult to work with. But I did run into a couple problems and thought I'd share them.

Apache config:
The pre-configured apache config that comes with the OTRS windows installer is setup to use /otrs as the home directory and also doesn't use index.pl or customer.pl as the default document. The following are the changes I made to use the base website as the host.

ThreadsPerChild 250
MaxRequestsPerChild 0

ServerRoot "C:/OTRS/Apache2"

Listen 80

LoadFile "C:/OTRS/Perl/bin/perl58.dll"

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule perl_module modules/mod_perl.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so

<IfModule mod_perl.c>
Perlrequire C:/OTRS/otrs/scripts/apache2-perl-startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlModule Apache2::RequestRec
</IfModule>

ServerAdmin admin@site.com

ServerName otrs.site.com:80

DocumentRoot "C:/OTRS/otrs/bin/cgi-bin"

<Directory />
ErrorDocument 403 /index.pl
Options FollowSymLinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.pl index.html index.htm default.htm
</Directory>

<Directory "C:/OTRS/otrs/bin/cgi-bin">
ErrorDocument 403 /index.pl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options FollowSymLinks ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
Order allow,deny
Allow from all
DirectoryIndex index.pl index.html index.htm default.htm
</Directory>

<IfModule dir_module>
DirectoryIndex index.pl index.html index.htm default.htm
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>

ErrorLog logs/error.log
LogLevel warn

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog logs/access.log common
</IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/OTRS/Apache2/cgi-bin/"
</IfModule>

<Directory "C:/OTRS/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

#------------@@Changes for OTRS@@-------------
Include "C:/OTRS/otrs/scripts/apache2-httpd-new.include.conf"



Aspell
Aspell is a nice feature if you aren't using a browser with built in spell checking. This also doesn't work out of the box. First of all, you need to download it. Then you need to install it making sure the path has no spaces. The default is in the "Program Files" folder, so that won't work. Then you need to go into the SysConfig and change the path to the executable.


Sendmail
The default config for the SMTP mailer uses sendmail. Well, Windows doesn't have send mail. So that was an easy fix in the SysConfig changing from sendmail to SMTP and inputting your SMTP server.

I believe those were all the major changes. One thing I am woried about though is upgrading using the installer. I believe that it will overwrite the files. I guess I'll have to worry about that when the next upgrade comes.