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

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 "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

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

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

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

CustomLog logs/access.log common

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

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

DefaultType text/plain

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

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

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

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.

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.


  1. Hi Brent,
    Thanks for sharing the information.

    I tried to install OTRS on windows XP.

    I have following issue:

    The Apache service named reported the following error:
    >>> (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address .

    I changed the port to 8082 as 80 was used by IIS.

    I am not able to start Apache.
    Could you please share your insights?


  2. Hi Ven,
    The only thing I could think would be that you either need to declare an IP or remove the IP. I am not using OTRS anymore as I have moved to spiceworks so I can't really test it out. Hope everything goes right with your install.

  3. Hi Brent,
    How can i remove the /otrs/ from the URL? I installed OTRS in my Windows server 2003 OS.Can you please give me some solution?
    - Mugunth