Changing the default URL and Securing help?

Moderator: crythias

Post Reply
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Changing the default URL and Securing help?

Post by plattnat »

Hi Everyone,

I recently installed 6.2.1 and need a little help with the SSL front of things. I'll also like to change the URL of the site, ideally i'll like to have the site navigate to domain.ext = customer portal and domain.ext/admin = staff login

I'm sure it's just a case of editing the zzz_otrs.conf file in the conf.d folder but i have no idea where to start?

Once i've done that i need to secure the site, but when i try and run certbot no domain is showing.

Code: Select all

Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
[
That's the error i get, any ideas?
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Changing the default URL and Securing help?

Post by root »

Hi,

There is no need to editing the zzz_otrs.conf and you should do this only of you familiar how to configure an Apache httpd. If you only want a redirect from / to /otrs/customer.pl and for agents /admin to /otrs/index.pl that's easy. Try these lines in a dedicated configuration file:

Code: Select all

Redirect / /otrs/customer.pl
Redirect /admin /otrs/index.pl

For handling TLS/SSL you should consider reading and understanding the documentation of Apache Module mod_md and mod_ssl

- 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 ?
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

root wrote: 13 Dec 2021, 18:26 Try these lines in a dedicated configuration file:

Code: Select all

Redirect / /otrs/customer.pl
Redirect /admin /otrs/index.pl
Where would i put this file, in the httpd folder or somewhere else?
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Changing the default URL and Securing help?

Post by root »

Hi,

That depends on your Linux distro, could be /etc/httpd/conf.d or /etc/apache2/conf-available, ...

- 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 ?
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

I used the redirects you suggested however it created an infinite loop with the base re-direct but works fine with the admin area redirect, any ideas?
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Changing the default URL and Securing help?

Post by root »

Hi,

What is the output when executing this command? Replace FQDN with your server's FQDN

curl -Iv https://FQDN/

- 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 ?
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

root wrote: 14 Dec 2021, 23:34 Hi,

What is the output when executing this command? Replace FQDN with your server's FQDN

curl -Iv https://FQDN/

- Roy
[root@helpdesk conf.d]# curl -Iv https://help.solidblueit.co.uk
* Rebuilt URL to: https://help.solidblueit.co.uk/
* Trying 194.168.90.84...
* TCP_NODELAY set
* Connected to help.solidblueit.co.uk (194.168.90.84) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, [no content] (0):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=help.solidblueit.co.uk
* start date: Dec 13 16:14:43 2021 GMT
* expire date: Mar 13 16:14:42 2022 GMT
* subjectAltName: host "help.solidblueit.co.uk" matched cert's "help.solidblueit.co.uk"
* issuer: C=US; O=Let's Encrypt; CN=R3
* SSL certificate verify ok.
* TLSv1.3 (OUT), TLS app data, [no content] (0):
> HEAD / HTTP/1.1
> Host: help.solidblueit.co.uk
> User-Agent: curl/7.61.1
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS app data, [no content] (0):
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Date: Wed, 15 Dec 2021 09:03:36 GMT
Date: Wed, 15 Dec 2021 09:03:36 GMT
< Server: Apache/2.4.37 (rocky) OpenSSL/1.1.1k mod_perl/2.0.11 Perl/v5.26.3
Server: Apache/2.4.37 (rocky) OpenSSL/1.1.1k mod_perl/2.0.11 Perl/v5.26.3
< Location: https://help.solidblueit.co.uk/otrs/customer.pl
Location: https://help.solidblueit.co.uk/otrs/customer.pl
< Content-Type: text/html; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1

<
* Connection #0 to host help.solidblueit.co.uk left intact

This is on the standard redirect from the core domain
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Changing the default URL and Securing help?

Post by root »

Hi,

Have you tried an fresh browser or using the private mode? The redirect works for me.

- 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 ?
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

It shouldn't be redirecting to /otrs/... etc it should just be on the main page
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Changing the default URL and Securing help?

Post by root »

Hi,

you should be a little bit more precise with your questions:

"i'll like to have the site navigate to domain.ext = customer portal and domain.ext/admin = staff login"

"navigate to" is pretty clear to me.

There is no way to hide /otrs/ for customer and use /admin/ for agents because there is only one configuration for the ScriptAlias. You might try a reverse proxy but this is a topic of this forum.

- 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 ?
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

root wrote: 15 Dec 2021, 15:22 Hi,

you should be a little bit more precise with your questions:

"i'll like to have the site navigate to domain.ext = customer portal and domain.ext/admin = staff login"

"navigate to" is pretty clear to me.

There is no way to hide /otrs/ for customer and use /admin/ for agents because there is only one configuration for the ScriptAlias. You might try a reverse proxy but this is a topic of this forum.

- Roy
You never mentioned the scriptalias before, so if i jsut change the script alias to / rather than /otrs/ then the site will be based at / and not otrs? Correct? Then i just tell staff to use the correct pl file (agent.pl) if that's right?
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Changing the default URL and Securing help?

Post by root »

Hi,

You need to adjust the SysConfig ScriptAlias and the related web server configuration.

- 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 ?
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

So i've done that and now i get the default domain for site but if i go to index.pl it loads the admin area but if i go the customer.pl i get an error. Any ideas?
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

The site is loading without images and i get the error;

The browser you are using is too old. This software runs with a huge lists of browsers, please upgrade to one of these. Please see the documentation or ask your admin for further information.

Latest versions of Chrome, Edge and Firefox so i doubt that's the issue
plattnat
Znuny newbie
Posts: 41
Joined: 26 Dec 2015, 09:42
Znuny Version: 6.2.1
Real Name: Nathan Platt

Re: Changing the default URL and Securing help?

Post by plattnat »

Found this from another users post;
rentier wrote: 11 Jul 2013, 15:34 Hi,

here you go, please ask if you have problems because I copied only the config parts that I changed

Code: Select all

# SysConfig
ScriptAlias = ""

Code: Select all

# Apache

Alias /otrs-web/ /opt/otrs/var/httpd/htdocs/
ScriptAliasMatch ^/(.*)\.pl /opt/otrs/bin/cgi-bin/$1.pl

RewriteEngine On

# Rewrite the start page to the customer frontend
RewriteCond %{REQUEST_URI} ^(/)?$
RewriteRule ^(.*)$ /customer.pl [PT,L]

# Rewrite old style URLs to new URLs
RewriteRule ^/otrs/(.*)$ /$1 [R=301,L]

<LocationMatch ^/.*\.pl>
  ErrorDocument 403 /index.pl
  SetHandler  perl-script
  PerlResponseHandler ModPerl::Registry
  Options +ExecCGI
  PerlOptions +ParseHeaders
  PerlOptions +SetupEnv
  Order allow,deny
  Allow from all
</LocationMatch>
Fixed the out of date issue but it's quite what i wanted
Post Reply