How to get rid of /otrs/ in your URI

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Forum rules
Dont create your support topics here! No new topics with questions allowed!
Post Reply
solefald
Znuny newbie
Posts: 25
Joined: 15 Apr 2011, 23:47
Znuny Version: 3.0.7

How to get rid of /otrs/ in your URI

Post by solefald »

Hello,

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} = '';
Apache otrs.conf changes:

Code: Select all

Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Alias / "/opt/otrs/bin/cgi-bin/"
Notice that Alias and ScriptAlias order has changed with Alias now on top, and ScriptAlias became Alias.

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>
Commenting out <Location> directive will disable mod_perl, so to re-enable it we need to copy needed directives into the <Directory /opt/otrs/bin/cgi-bin/> section and change SetHandler to AddHandler.

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>
Change DocumentRoot in your virtual host config (NOT otrs.conf) to

Code: Select all

DocumentRoot /opt/otrs/bin/cgi-bin/
Restart apache and you should be good.
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.
RHEL 5.8 :( / OTRS 3.2.0beta2 / SystemMonitoring
dylan650
Znuny newbie
Posts: 29
Joined: 18 May 2012, 19:48
Znuny Version: 3.1.2

Re: How to get rid of /otrs/ in your URI

Post by dylan650 »

or assuming you don't have anything else running on your web server, just add this line to your index.html file. If you don't have an index.html, just create one.

<meta http-equiv="refresh" content="0; url=./otrs/customer.pl">

This tells your web server that when he sees any hits come in, redirect them to /otrs/customer.pl.

If you do this, you won't have to muck around with any other configuration. :)
solefald
Znuny newbie
Posts: 25
Joined: 15 Apr 2011, 23:47
Znuny Version: 3.0.7

Re: How to get rid of /otrs/ in your URI

Post by solefald »

dylan650 wrote:or assuming you don't have anything else running on your web server, just add this line to your index.html file. If you don't have an index.html, just create one.

<meta http-equiv="refresh" content="0; url=./otrs/customer.pl">

This tells your web server that when he sees any hits come in, redirect them to /otrs/customer.pl.

If you do this, you won't have to muck around with any other configuration. :)
Your method does not get rid of /otrs/ in the URL. All you do is redirect a user to another page.
I like to keep my URLS clean, so having a URL look like http://otrs.domain.com/otrs/ is a half-assed approach.
RHEL 5.8 :( / OTRS 3.2.0beta2 / SystemMonitoring
schweppers
Znuny newbie
Posts: 8
Joined: 16 Jul 2012, 11:07
Znuny Version: 3.1.7

Re: How to get rid of /otrs/ in your URI

Post by schweppers »

solefald wrote:Hello,

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} = '';
Apache otrs.conf changes:

Code: Select all

Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Alias / "/opt/otrs/bin/cgi-bin/"
Notice that Alias and ScriptAlias order has changed with Alias now on top, and ScriptAlias became Alias.

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>
Commenting out <Location> directive will disable mod_perl, so to re-enable it we need to copy needed directives into the <Directory /opt/otrs/bin/cgi-bin/> section and change SetHandler to AddHandler.

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>
Change DocumentRoot in your virtual host config (NOT otrs.conf) to

Code: Select all

DocumentRoot /opt/otrs/bin/cgi-bin/
Restart apache and you should be good.
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.
Hello,

any idea how to make it on nginx webserver ?
BigTex
Znuny newbie
Posts: 9
Joined: 20 Jul 2012, 21:16
Znuny Version: 3.1.7

Re: How to get rid of /otrs/ in your URI

Post by BigTex »

solefald wrote:Hello,

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} = '';
Apache otrs.conf changes:

Code: Select all

Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Alias / "/opt/otrs/bin/cgi-bin/"
Notice that Alias and ScriptAlias order has changed with Alias now on top, and ScriptAlias became Alias.

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>
Commenting out <Location> directive will disable mod_perl, so to re-enable it we need to copy needed directives into the <Directory /opt/otrs/bin/cgi-bin/> section and change SetHandler to AddHandler.

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>
Change DocumentRoot in your virtual host config (NOT otrs.conf) to

Code: Select all

DocumentRoot /opt/otrs/bin/cgi-bin/
Restart apache and you should be good.
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.

I appreciate your post and I am certainly interested in implementing this, but I cannot find which files that you are talking about modifying. Can you please be more specific for us newbies???
Production: OTRS 3.1.8 on Windows 2008 R2 Server, IIS v7.5, and SQL Server 2008 R2 database
QA/Test: OTRS 3.1.8 on Windows 2008 R2 Server, Apache, and MySQL database
BigTex
Znuny newbie
Posts: 9
Joined: 20 Jul 2012, 21:16
Znuny Version: 3.1.7

Re: How to get rid of /otrs/ in your URI

Post by BigTex »

solefald wrote:Hello,

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} = '';
Apache otrs.conf changes:

Code: Select all

Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Alias / "/opt/otrs/bin/cgi-bin/"
Notice that Alias and ScriptAlias order has changed with Alias now on top, and ScriptAlias became Alias.

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>
Commenting out <Location> directive will disable mod_perl, so to re-enable it we need to copy needed directives into the <Directory /opt/otrs/bin/cgi-bin/> section and change SetHandler to AddHandler.

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>
Change DocumentRoot in your virtual host config (NOT otrs.conf) to

Code: Select all

DocumentRoot /opt/otrs/bin/cgi-bin/
Restart apache and you should be good.
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.

Hello, can you kindly be more specific about which files to modify for us newbies. i.e. - filenames, etc.
Production: OTRS 3.1.8 on Windows 2008 R2 Server, IIS v7.5, and SQL Server 2008 R2 database
QA/Test: OTRS 3.1.8 on Windows 2008 R2 Server, Apache, and MySQL database
bleitner
Znuny newbie
Posts: 17
Joined: 29 Apr 2012, 18:09
Znuny Version: 3.1.4
Real Name: bob
Company: temboo

Re: How to get rid of /otrs/ in your URI

Post by bleitner »

After making this change what is the URL to get to the customer login?
pandaketawa
Znuny newbie
Posts: 1
Joined: 27 Jul 2012, 09:34
Znuny Version: 3.1.6
Real Name: Adi
Company: Binus University

Re: How to get rid of /otrs/ in your URI

Post by pandaketawa »

i got this error, when follow above step

root@ticketing:~# /etc/init.d/apache2 restart
Syntax error on line 56 of /etc/apache2/sites-enabled/otrs.conf:
Invalid command 'PerlResponseHandler', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
failed!


any suggest ?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How to get rid of /otrs/ in your URI

Post by reneeb »

Do you have mod_perl installed?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
denbagusjkt
Znuny newbie
Posts: 23
Joined: 07 Jun 2012, 09:20
Znuny Version: 3.1.5
Real Name: denbagus
Company: indolabsoft

Re: How to get rid of /otrs/ in your URI

Post by denbagusjkt »

i follow all your instruction, but if while accessing my server with url http://myserver/ always getting 404 not found error page, because always redirected to /otrs/index.pl. but if i try to accessing http://"myserver"/index.pl its work perfectly.
solefald
Znuny newbie
Posts: 25
Joined: 15 Apr 2011, 23:47
Znuny Version: 3.0.7

Re: How to get rid of /otrs/ in your URI

Post by solefald »

denbagusjkt wrote:i follow all your instruction, but if while accessing my server with url http://myserver/ always getting 404 not found error page, because always redirected to /otrs/index.pl. but if i try to accessing http://"myserver"/index.pl its work perfectly.
This means that you did not really followed my instructions and missed following line:

Code: Select all

  DirectoryIndex index.pl
RHEL 5.8 :( / OTRS 3.2.0beta2 / SystemMonitoring
averlon
Znuny newbie
Posts: 6
Joined: 01 Mar 2013, 17:06
Znuny Version: 3.2.2
Real Name: Karl-Heinz Fischbach

Re: How to get rid of /otrs/ in your URI

Post by averlon »

Hi solefald,

I am keen to go to such a solution with a virtual host. Looking around in the web I did currently not find any working.

Since nearly every setup is a little bit different, there probable need to be some adjustments in the one or other case.

For example in my environment the host otrs is installed on does also host some other webpages/applications.

I am not realy an export. I guess, to run your configuration together with other virtual hosts there needs to be somethin in addition.

What do you think. Would this do it? It does not work in my environment but I also did not find any error messages except the page could not be found.

The installation location is different in my case.

Code: Select all

<VirtualHost *:80>

DocumentRoot "/var/www/av_otrs/bin/cgi-bin/"
ServerName ticket.av.loc

Alias /otrs-web/ "/var/www/av_otrs/var/httpd/htdocs/"
Alias / "/var/www/av_otrs/bin/cgi-bin/"

<Directory "/var/www/av_otrs/bin/cgi-bin">
	AllowOverride None
	Options +ExecCGI -Includes
	Order allow,deny
	Allow from all

	ErrorDocument 403 /index.pl
	DirectoryIndex index.pl
	AddHandler  perl-script .pl .cgi
	PerlResponseHandler ModPerl::Registry
	PerlOptions +ParseHeaders
	PerlOptions +SetupEnv
</Directory>

</VirtualHost>
Any suggestions?
Gruß
Kalle
ZzynxX
Znuny newbie
Posts: 2
Joined: 22 Mar 2013, 05:19
Znuny Version: 3.2.3
Real Name: Rahmat Naim
Company: Research Management Centre, UTM

Re: How to get rid of /otrs/ in your URI

Post by ZzynxX »

Hye, thanks for the post, but can you be more specific on which file do i need to modified, I am really new with this. I have followed your instruction, searching for the file but I'm still not sure if I modified the right file, help me please.. T.T
and i can't seem to find where is the DocumentRoot
eXo
Znuny newbie
Posts: 1
Joined: 13 Apr 2013, 13:07
Znuny Version: 3.2.2

Re: How to get rid of /otrs/ in your URI

Post by eXo »

After some time trying to make this work, This is what made it happen:

1 - I copied /etc/apache2/conf.d/otrs2 config file to /var/www/apache2/sites-available/otrs
2 - I modified the configuration file to make it a Virtual Host
3 - I made a few changes to the suggestions made here to make it work

Code: Select all

NameVirtualHost 1.2.3.4:443
<VirtualHost 1.2.3.4:443>
        ServerAdmin address@hidden.xxx
        Servername site.hidden.xxx
        DocumentRoot /opt/otrs/bin/cgi-bin/

            SSLEngine on
            SSLCertificateFile "xxxxxxxxxxxxxx"
            SSLCertificateKeyFile "xxxxxxxxxxxxx"


# agent, admin and customer frontend
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Alias / "/opt/otrs/bin/cgi-bin/"

# directory settings
<Directory "/opt/otrs/bin/cgi-bin/">
    AddHandler cgi-script .cgi .pl
    AllowOverride None
    Options +ExecCGI -Includes
    Order allow,deny
    Allow from all

<IfModule mod_perl.c>
      # load all otrs modules
      Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

      # Apache::Reload - Reload Perl Modules when Changed on Disk
      PerlModule Apache2::Reload
      PerlInitHandler Apache2::Reload
      PerlModule Apache2::RequestRec

      ErrorDocument 403 /index.pl
      DirectoryIndex index.pl
      AddHandler perl-script .cgi .pl
      PerlResponseHandler ModPerl::Registry
      Options +ExecCGI +FollowSymLinks
      PerlOptions +ParseHeaders
      PerlOptions +SetupEnv
    </IfModule>

</Directory>

<Directory "/opt/otrs/var/httpd/htdocs/">
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_headers.c>
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
        <FilesMatch "\.(css|CSS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>
</IfModule>
</VirtualHost>
Probably some mistakes there and double configurations, but i really don't know what I'm doing, it was a bit of trial and error seasoned with a bit of documentation.
Bottom line, it works, no more /otrs and no more trying to download the index.pl because it was not executing
davet
Znuny newbie
Posts: 1
Joined: 16 Apr 2013, 02:27
Znuny Version: 3.2.5

Re: How to get rid of /otrs/ in your URI

Post by davet »

Thanks eXo

I had to comment the <IfModule mod_perl.c> section because of errors when restarting apache

Code: Select all

service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: Syntax error on line 274 of /etc/httpd/conf.d/ssl.conf:
Perlrequire directive not allowed in a <Directory> block
                                                           [FAILED]
[root@mnvotrs conf.d]#
[root@mnvotrs conf.d]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 277 of /etc/httpd/conf.d/ssl.conf:
PerlModule directive not allowed in a <Directory> block
                                                           [FAILED]
[root@otrs conf.d]#
[root@otrs conf.d]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]

Code: Select all

      # load all otrs modules
      #Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

      # Apache::Reload - Reload Perl Modules when Changed on Disk
      #PerlModule Apache2::Reload
      #PerlInitHandler Apache2::Reload
      #PerlModule Apache2::RequestRec
     
      ErrorDocument 403 /index.pl
      DirectoryIndex index.pl
      AddHandler perl-script .cgi .pl
      PerlResponseHandler ModPerl::Registry
      Options +ExecCGI +FollowSymLinks
      PerlOptions +ParseHeaders
      PerlOptions +SetupEnv
    </IfModule>

You would normally do your NameVirtualHost settings like so - it only needs to match the servername from the URL

Code: Select all

NameVirtualHost *:443
<VirtualHost *:443>
Servername your.otrs.servername
etc
Now it ruins beautifully with https://otrs :)
ITfromScratch
Znuny newbie
Posts: 2
Joined: 15 Apr 2013, 17:20
Znuny Version: OTRS 3.2
Real Name: The New Guy

Re: How to get rid of /otrs/ in your URI

Post by ITfromScratch »

There was not a VirtualHost file for my OTRS installation (Ubuntu Server 12.04) so I created one by somewhat following this article.

I used this code to create the file:

Code: Select all

sudo nano /etc/apache2/sites-available/otrs
I put this in the file:

Code: Select all

<VirtualHost *>
     ServerName [enter server name]
     DocumentRoot /opt/otrs/bin/cgi-bin/
</VirtualHost>
Then I changed to the sites-enabled folder:

Code: Select all

cd /etc/apache2/sites-enabled
And then added a symlink to the sites-available file:

Code: Select all

ln -s /etc/apache2/sites-available/otrs
This walkthrough does make OTRS available without "/otrs/" in the URL, but you can still navigate to OTRS with "/otrs/" in the URL.

My next step is to create an Apache redirect rule that will make everyone use the non-"/otrs/" URL.
TBird
Znuny newbie
Posts: 11
Joined: 31 May 2013, 22:45
Znuny Version: 3.1.7
Real Name: Dan

Re: How to get rid of /otrs/ in your URI

Post by TBird »

Someone can be more specific. I don`t understand what i need to copy and where to paste

" Commenting out <Location> directive will disable mod_perl, so to re-enable it we need to copy needed directives into the <Directory /opt/otrs/bin/cgi-bin/> section and change SetHandler to AddHandler. "



Please ?:P
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

Re: How to get rid of /otrs/ in your URI

Post by kalyana1315 »

TBird wrote:Someone can be more specific. I don`t understand what i need to copy and where to paste

" Commenting out <Location> directive will disable mod_perl, so to re-enable it we need to copy needed directives into the <Directory /opt/otrs/bin/cgi-bin/> section and change SetHandler to AddHandler. "



Please ?:P
Path:

1 \OTRS\scripts\apache2-httpd.include.conf
2 \OTRS\Apache\conf\httpd.conf
cbruigom
Znuny newbie
Posts: 36
Joined: 17 Apr 2014, 23:38
Znuny Version: 3.3.5
Real Name: Clinton

Re: How to get rid of /otrs/ in your URI

Post by cbruigom »

Hi There,

I would like to confirm if this post still applies to OTRS 4? I have made the changes as per the original post and can now access OTRS without having to type in /otrs/index.pl however there are additional lines within the otrs.conf that are delivered with OTRS 4 that are not referenced in the original post.

In my otrs.conf Directory section also have:

Code: Select all

<Directory "/opt/otrs/bin/cgi-bin/">
     Options +ExecCGI -Includes
In the location section however it is:

Code: Select all

Options +ExecCGI
Should the section that we copy from the location section to the directory section exclude or include "-Includes"?

Secondly there is another location section under the first location section which is:

Code: Select all

    <Location /otrs/nph-genericinterface.pl>
        PerlOptions -ParseHeaders
    </Location>
Should this location section also be commented out?
Faqeer1
Znuny newbie
Posts: 1
Joined: 08 Apr 2016, 08:20
Znuny Version: aaaaaaa
Real Name: aaaaaaa
Company: 13456

Re: How to get rid of /otrs/ in your URI

Post by Faqeer1 »

I have made the changes as per the original post and can now access OTRS without having to type in /otrs/index.pl however there are additional lines within the otrs.conf that are delivered with OTRS 4 that are not referenced in the original post.????
== Solitaire ==
arestas
Znuny newbie
Posts: 23
Joined: 09 Mar 2016, 18:04
Znuny Version: 3.3.5
Company: www.google.pt

Re: How to get rid of /otrs/ in your URI

Post by arestas »

Does this apply to OTRS5?

Regards,
SuperDOS
Znuny newbie
Posts: 93
Joined: 17 Apr 2012, 16:16
Znuny Version: 6.0.3
Real Name: A!

Re: How to get rid of /otrs/ in your URI

Post by SuperDOS »

Any updates on this?
dlhost
Znuny newbie
Posts: 8
Joined: 28 Mar 2017, 21:33
Znuny Version: 5s Patch18

Re: How to get rid of /otrs/ in your URI

Post by dlhost »

i tryed it out and it won't work with otrs5.

If i have time next days i look into details... it's a simpel webserver config and i'm sure a simpel rewrite works too
nthieuutc
Znuny newbie
Posts: 16
Joined: 19 Apr 2017, 13:28
Znuny Version: 5.0.18

Re: How to get rid of /otrs/ in your URI

Post by nthieuutc »

SuperDOS wrote:Any updates on this?
Almost in one url I don't know but bellow way may good for your company. I hope helpful.
1. Create DNS record for your OTRS server.
example: ticket.yourdomain.com for agent portal
request.yourdomain.com for Customer portal
wiki.yourdoamin.com for Public portal.

2. Make some copy file /etc/httpd/conf.d/zzz_otrs.conf and rename to:
ortsagent.conf, otrsCustomer.conf, otrswiki.conf.

3. Add Vituralhost configuration in to each copied files
Example for otrsagent.conf

<VirtualHost *:80>
ServerName ticket.yourdomain.com
DocumentRoot /opt/otrs/bin/cgi-bin
<Directory /opt/otrs/bin/cgi-bin/>
Options FollowSymLinks
AllowOverride None
DirectoryIndex /otrs/index.pl
</Directory>


Do the same with otrsCustomer.conf and otrswiki.conf but change index.pl to customer.pl or public.pl..

<VirtualHost *:80>
ServerName request.yourdomain.com
DocumentRoot /opt/otrs/bin/cgi-bin
<Directory /opt/otrs/bin/cgi-bin/>
Options FollowSymLinks
AllowOverride None
DirectoryIndex /otrs/customer.pl
</Directory>


and

<VirtualHost *:80>
ServerName wiki.yourdomain.com
DocumentRoot /opt/otrs/bin/cgi-bin
<Directory /opt/otrs/bin/cgi-bin/>
Options FollowSymLinks
AllowOverride None
DirectoryIndex /otrs/public.pl
</Directory>


Br,
Post Reply