OTRS Default in Debian/Apache

Moderator: crythias

Post Reply
Eclat2k
Znuny newbie
Posts: 44
Joined: 07 Jun 2011, 18:48
Znuny Version: 3.08
Real Name: Pablo
Company: 2KSystems
Location: Ferrol, A Coruña (Spain)

OTRS Default in Debian/Apache

Post by Eclat2k »

Hi guys, I want to make that OTRS load like the default page in apache. This way I can access directly to my server with OTRS with http://ip_address and I don't need write http://ip_address/otrs/index.pl.

I found this topic:
http://forums.otrs.org/viewtopic.php?f=60&t=9329

And I want to know in this step:
Change DocumentRoot in your virtual host config (NOT otrs.conf)
Where is your VirtualHost config?: /etc/apache2/sites-enabled/000-default?

Thanks
System:
OTRS 3.0.10/ ITSM 3.0.4
OS: Debian 6.02 in a VirtualMachine in Windows Server 2008 with VirtualBox, MySql 5.0.x
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS Default in Debian/Apache

Post by crythias »

That could be. If you want to be sure:
cd /etc/apache2
grep -sir "otrs" *

That will tell you what files have otrs in them.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Eclat2k
Znuny newbie
Posts: 44
Joined: 07 Jun 2011, 18:48
Znuny Version: 3.08
Real Name: Pablo
Company: 2KSystems
Location: Ferrol, A Coruña (Spain)

Re: OTRS Default in Debian/Apache

Post by Eclat2k »

I have OTRS in sites-available/default and sites-enabled/000-default. I have two equal lines:

Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"

I'm going to try it :)

Thanks crythias (again :D)
System:
OTRS 3.0.10/ ITSM 3.0.4
OS: Debian 6.02 in a VirtualMachine in Windows Server 2008 with VirtualBox, MySql 5.0.x
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS Default in Debian/Apache

Post by crythias »

Just FYI sites-enabled are by default (though not necessarily every time, but good practice...) symlinks to specific sites-available entries. Or, in other words, the same file, so you can simply delete a sites-enabled entry and not worry about removing the config. (or edit either and reflect both places).

Disclaimer: Verify that I am telling the truth before taking me at my say-so. Just because some are done this way, doesn't mean it necessarily applies to your setup.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
crlsgms
Znuny newbie
Posts: 1
Joined: 20 Apr 2012, 23:17
Znuny Version: otrs 3.1
Real Name: Carlos Gomes
Company: UNESP
Location: Franca - SP / Brasil
Contact:

Re: OTRS Default in Debian/Apache

Post by crlsgms »

Hello everyone! Well, after setting up the latest version of otrs, Iv checked that it came with an otrs.conf file, which makes all the modules to be up, and work fine, but I have to manually enter the customer.pl if I want to to to the user interface. As I want this server to be acessible for both the users and admins, I would use two subdomains here, that are already pointed up to my otrs server, and I would like to access the index.pl page only via the subdomain "admin.suporte.franca.unesp.br" and the customer.pl answer into the "suporte.franca.unesp.br"

That said, Iv enabled virtual hosts in debian, and create two entryes, similar to the otrs.conf the apt file set up in apache2/conf.d but I cant manage to get the site working with all the css and login scripts, All I have its a blank screen with pure text.

here are some of the files and infos I can provide. Help is much appreciated.

my apachectl -S:

Code: Select all

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
default server admin.suporte.franca.unesp.br (/etc/apache2/sites-enabled/admin.suporte.franca.unesp.br:3)
       port 80 namevhost admin.suporte.franca.unesp.br (/etc/apache2/sites-enabled/admin.suporte.franca.unesp.br:3)
       port 80 namevhost suporte.franca.unesp.br (/etc/apache2/sites-enabled/suporte.franca.unesp.br:3)
Syntax OK

file apache2/sites-avaiable/suporte.franca.unesp.br

Code: Select all

#mod so endereco de suporte (/etc/apache2/sites-available/suporte.franca.unesp.br)
#
<VirtualHost *:80>
        ServerAdmin cgomes@franca.unesp.br
        ServerName  suporte.franca.unesp.br
        ServerAlias suporte.franca.unesp.br

        # Indexes + Directory Root.
        DirectoryIndex customer.pl
        DocumentRoot /opt/otrs/bin/cgi-bin/

        # CGI Directory
        # ScriptAlias /otrs/ /opt/otrs/bin/cgi-bin/ 
        <Location /otrs>
                SetHandler perl-script
                PerlResponseHandler ModPerl::Registry
                PerlOptions +ParseHeaders
                PerlSetupEnv On
        </Location>

        <Directory />
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                AddHandler cgi-script .pl
        </DirectOry>

        # Logfiles
        ErrorLog  /var/log/otrs/customer/error.log
        CustomLog /var/log/otrs/customer/access.log combined
</VirtualHost>
file apache2/sites-enabled/admin.suporte.franca.unesp.br

Code: Select all

#mod do endereco de suporte (/etc/apache2/sites-available/admin.suporte.franca.unesp.
br)
#
<VirtualHost *:80>
        ServerAdmin cgomes@franca.unesp.br
        ServerName  admin.suporte.franca.unesp.br
        ServerAlias admin.suporte.franca.unesp.br

        # Indexes + Directory Root.
        DirectoryIndex index.pl
        DocumentRoot /opt/otrs/bin/cgi-bin/

        # CGI Directory
        # ScriptAlias /otrs/ /opt/otrs/bin/cgi-bin/ 
        <Location /otrs>
                SetHandler perl-script
                PerlResponseHandler ModPerl::Registry
                PerlOptions +ParseHeaders
                PerlSetupEnv On
        </Location>

        <Directory />
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                AllowOverride None
                AddHandler cgi-script .pl
        </Directory>

        # Logfiles
        ErrorLog  /var/log/otrs/admin/error.log
        CustomLog /var/log/otrs/admin/access.log combined
</VirtualHost>
otrs.conf file

Code: Select all

# --
# added for OTRS (http://otrs.org/)
# $Id: apache2-httpd.include.conf,v 1.25 2011/11/05 17:39:09 mb Exp $
# --

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

# activate this if you are using an Oracle database
#SetEnv ORACLE_HOME /path/to/your/oracle/
#SetEnv ORACLE_SID YOUR_SID
#SetEnv NLS_LANG AMERICAN_AMERICA.UTF8
#SetEnv NLS_DATE_FORMAT 'YYYY-MM-DD HH24:MI:SS'

# if mod_perl is used
<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

    # set mod_perl2 options
#    <Location /otrs>
#        ErrorDocument 403 /otrs/customer.pl
#        ErrorDocument 403 /otrs/index.pl
#        SetHandler  perl-script
#        PerlResponseHandler ModPerl::Registry
#        Options +ExecCGI
#        PerlOptions +ParseHeaders
#        PerlOptions +SetupEnv
#        Order allow,deny
#        Allow from all
#    </Location>

    # set mod_perl2 option for generic interface
    <Location /otrs/nph-genericinterface.pl>
        PerlOptions -ParseHeaders
    </Location>

</IfModule>

# directory settings
<Directory "/opt/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>
<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>

# MaxRequestsPerChild (so no apache child will be to big!)
MaxRequestsPerChild 4000

Im wondering how to assemble the entryies needed in each sites-enabled so the server answer the requests correctly, and point up the user to the right .pl file.
Post Reply