Umstellen auf HTTPS

Hilfe zu OTRS Problemen aller Art
Post Reply
kleinemeise
Znuny newbie
Posts: 47
Joined: 03 Jun 2016, 13:05
Znuny Version: 5.0.24

Umstellen auf HTTPS

Post by kleinemeise »

Hallo,

ich habe auf Debian ein OTRS 5.0.10 aufgesetzt. Aktuell ist es per HTTP und HTTPS erreichbar.

Wie bekomme ich es hin, dass http://otrs.firma.de direct nach https://otrs.firma.de umgeleitet wird?

Ich habe es schon per .htaccess versucht:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
nur weiß ich nicht, WO ich die ablegen muss?
Kommt die in /opt/otrs/bin/cgi-bin oder /opt/otrs/var/httpd/htdocs
nd0
Znuny expert
Posts: 232
Joined: 24 Mar 2015, 16:53
Znuny Version: 5.0.14
Location: Colonia

Re: Umstellen auf HTTPS

Post by nd0 »

Probier mal in "/etc/apache2/sites-enabled" die "000-default" folgendermaßen anzupassen:

Code: Select all

<VirtualHost *:80>
	ServerAdmin webmaster@localhost

  DocumentRoot /var/www
  <Directory />
  Options FollowSymLinks
  AllowOverride All
  </Directory>
  <Directory /var/www/>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  allow from all
  </Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
DirectoryIndex customer.pl

RewriteEngine On

RewriteCond %{HTTP_HOST} !^otrs.firma\.de$ [NC,OR] 
RewriteCond %{HTTPS} =off 
RewriteRule ^/(.*)$ https://otrs.firma.de/$1 [R=301]


</VirtualHost>
Hab da auch ne ganze Weile nach gesucht damals und es am Ende dann (so glaube ich zumindest) mit Hilfe dieser Änderung erreicht.
LIVE: OTRS 5.0.14 || Debian || MySQL/LDAP
TEST: OTRS 5.0.14 || Debian || MySQL/LDAP
kleinemeise
Znuny newbie
Posts: 47
Joined: 03 Jun 2016, 13:05
Znuny Version: 5.0.24

Re: Umstellen auf HTTPS

Post by kleinemeise »

danke, hat funktioniert :-)
Post Reply