This message is a cross-post from the Help forum, but I figured it deserves its own post, because i did not find this information anywhere and it may be useful for someone else.
Here is how to remove "/otrs/" from your URI, retaining all functionality and making DirectoryIndex work, so you dont have to type index.pl every time.
OTRS Config settings:
Framework -> Core -> ScriptAlias needs to be blank.
Code: Select all
$Self->{ScriptAlias} = '';
Code: Select all
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Alias / "/opt/otrs/bin/cgi-bin/"
Location section below is no longer needed, because it will break all CSS and jQuery, so you can just comment the whole thing out
Code: Select all
# <Location /otrs>
# ErrorDocument 403 /otrs/customer.pl
# ErrorDocument 403 /otrs/index.pl
# DirectoryIndex index.pl
# SetHandler perl-script
# PerlResponseHandler ModPerl::Registry
# Options +ExecCGI
# PerlOptions +ParseHeaders
# PerlOptions +SetupEnv
# Order allow,deny
# Allow from all
# </Location>
Code: Select all
<Directory "/opt/otrs/bin/cgi-bin/">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
#
# Below is what we copied from the <Location> section
#
ErrorDocument 403 /index.pl
DirectoryIndex index.pl
AddHandler perl-script .pl .cgi <----- change ScriptHandler setting here.
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
</Directory>
Code: Select all
DocumentRoot /opt/otrs/bin/cgi-bin/
No errors in the logs, and going to http://otrs.example.com takes you straight to the OTRS Agent login screen.
I hope this helps.