Apache2.4 denied 403 on otrs-web

Moderator: crythias

Post Reply
lperdereau
Znuny newbie
Posts: 7
Joined: 12 Dec 2018, 13:23
Znuny Version: 6.0.5
Real Name: Louis

Apache2.4 denied 403 on otrs-web

Post by lperdereau »

Hi, i'm new and I install local version of otrs to try it.
But when I run localhost/otrs I got:
This software runs with a huge lists of browsers, please upgrade to one of these.

I look in Chrome DevTools and I see :

Code: Select all

TranslationJS_fr_5ee242978f8007fc85967ce3d3abeb04.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
jquery-ui.css:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
font-awesome.min.css:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
CommonJS_4907b8e2351888149d798c4f34b41814.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
ads.js:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
CommonCSS_956739b80817e64f9f5b44e7dc146522.css:1 Failed to load resource: the server responded with a status of 403 (Forbidden)
And when i try localhost/otrs-web/ I got 403 forbiden

Could you help please?

this is my conf (I have to keep it in vhost and ibill.otrs <=> localhost)

Code: Select all

<VirtualHost ibill.otrs:80>
 ServerName ibill.otrs
 ScriptAlias "/otrs/" "/opt/otrs/bin/cgi-bin/"
 Alias "/otrs-web/" "/opt/otrs/var/httpd/htdocs/"
 # 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
         Require all granted
     </Location>

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

 </IfModule>

 # directory settings
 <Directory "/otrs/">
         AllowOverride None
         Options +ExecCGI -Includes
         Require all granted
         ErrorDocument 403 /index.pl
         DirectoryIndex customer.pl
         AddHandler  perl-script .pl .cgi
         PerlResponseHandler ModPerl::Registry
         PerlOptions +ParseHeaders
         PerlOptions +SetupEnv
 </Directory>

<Directory "/otrs-web/">
    AllowOverride None
    Require all granted
    <IfModule mod_version.c>
        Require all granted
    </IfModule>
    <IfModule !mod_version.c>
        Require all granted
    </IfModule>

    <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/html text/javascript text/css text/xml application/json text/json
    </IfModule>

    # Make sure CSS and JS files are read as UTF8 by the browsers.
    AddCharset UTF-8 .css
    AddCharset UTF-8 .js

    # Set explicit mime type for woff fonts since it is relatively new and apache may not know about it.
    AddType application/font-woff .woff

</Directory>

<IfModule mod_headers.c>
    # Cache css-cache for 30 days
    <Directory "/otrs-web/skins/*/*/css-cache">
        <FilesMatch "\.(css|CSS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache css thirdparty for 4 hours, including icon fonts
    <Directory "/otrs-web/skins/*/*/css/thirdparty">
        <FilesMatch "\.(css|CSS|woff|svg)$">
            Header set Cache-Control "max-age=14400 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache js-cache for 30 days
    <Directory "/otrs-web/js/js-cache">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache js thirdparty for 4 hours
    <Directory "/otrs-web/js/thirdparty/">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=14400 must-revalidate"
        </FilesMatch>
    </Directory>
</IfModule>

 </VirtualHost>
 
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Apache2.4 denied 403 on otrs-web

Post by root »

Hi,

Just keep the OTRS config (ScriptAlias etc) outside the virtual host. For anything else it's Apache httpd related and not to OTRS.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lperdereau
Znuny newbie
Posts: 7
Joined: 12 Dec 2018, 13:23
Znuny Version: 6.0.5
Real Name: Louis

Re: Apache2.4 denied 403 on otrs-web

Post by lperdereau »

root wrote: 28 Dec 2018, 11:16 Hi,

Just keep the OTRS config (ScriptAlias etc) outside the virtual host. For anything else it's Apache httpd related and not to OTRS.

- Roy
Sorry Root but i dont precise i got an other virtual host for my main office application so i want to make a différence between them.
Can i do it with 2 vhost?
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Apache2.4 denied 403 on otrs-web

Post by root »

Hi,

Of course, this is possible. It's all about a proper Apache httpd configuration. 403 indicates that's something wrong with your config. Without knowing any details it's hard to help.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lperdereau
Znuny newbie
Posts: 7
Joined: 12 Dec 2018, 13:23
Znuny Version: 6.0.5
Real Name: Louis

Re: Apache2.4 denied 403 on otrs-web

Post by lperdereau »

root wrote: 28 Dec 2018, 13:34 Hi,

Of course, this is possible. It's all about a proper Apache httpd configuration. 403 indicates that's something wrong with your config. Without knowing any details it's hard to help.

- Roy
Ok cool, what I can provide you Roy for understand my problem?
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Apache2.4 denied 403 on otrs-web

Post by root »

Hi,

Increase the LogLevel to debug and post the relevant entries from the Apache log

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
lperdereau
Znuny newbie
Posts: 7
Joined: 12 Dec 2018, 13:23
Znuny Version: 6.0.5
Real Name: Louis

Re: Apache2.4 denied 403 on otrs-web

Post by lperdereau »

root wrote: 28 Dec 2018, 15:25 Hi,

Increase the LogLevel to debug and post the relevant entries from the Apache log

- Roy
Okay thanks a lot for LogLevel i found the missing tag in my conf.

Code: Select all

<Location "/otrs-web">
  require all granted
</Location>
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Apache2.4 denied 403 on otrs-web

Post by root »

Hi,

Instead of reinventing the wheel I can only recommend using the config from scripts/apache2-httpd.include.conf. The best way is to include this file.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply