Apache mod_ssl http to https

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I've installed OTRS 6 on CentOS7 to exlpore it's features and I struggle to make it available via https. It installs Apache, and I have installed the mod_ssl module, created a self-signed certificate and modified the ssl.conf file to point to the private key and the certificate file. When I access the web page via https://server/otrs/index.pl I get the self-signed certificate warning and I'm able to access it but I can still access it via HTTP. Few google searches later I'm still not able to prevent or re-direct all HTTP requests to https. I've found this article Using an SSL certificate with OTRS and it says to put the following lines in the HTTP virtual host configuration:



RewriteEngine On 
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_HOST%REQUEST_URI


But the problem is that in my ssl.conf there is no section for HTTP virtual host, I can see only one for HTTPS <VirtualHost_default_:443



What am I doing wrong? Any help is much appreciated!







share|improve this question






















  • Try this rule: RewriteRule ^(.*) https://%HTTP_HOST/$1 [R=301,L]
    – George Udosen
    Jan 14 at 12:20










  • Thank you. Should I put it in the ssl.conf file under <VirtualHost_default_:443 ?
    – adam86
    Jan 14 at 12:23










  • This should be in the .htaccess file and you should have a line Redirect permanent / https://<your_site_name>/ in the <VirtualHost *:80></VirtualHost> block in your site conf file
    – George Udosen
    Jan 14 at 12:30











  • .htaccess - it's not there
    – adam86
    Jan 14 at 13:10










  • Place it here /etc/httpd/conf.d/zzz_otrs.conf from docs I have seen, yours might be called differently
    – George Udosen
    Jan 14 at 13:14















up vote
0
down vote

favorite












I've installed OTRS 6 on CentOS7 to exlpore it's features and I struggle to make it available via https. It installs Apache, and I have installed the mod_ssl module, created a self-signed certificate and modified the ssl.conf file to point to the private key and the certificate file. When I access the web page via https://server/otrs/index.pl I get the self-signed certificate warning and I'm able to access it but I can still access it via HTTP. Few google searches later I'm still not able to prevent or re-direct all HTTP requests to https. I've found this article Using an SSL certificate with OTRS and it says to put the following lines in the HTTP virtual host configuration:



RewriteEngine On 
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_HOST%REQUEST_URI


But the problem is that in my ssl.conf there is no section for HTTP virtual host, I can see only one for HTTPS <VirtualHost_default_:443



What am I doing wrong? Any help is much appreciated!







share|improve this question






















  • Try this rule: RewriteRule ^(.*) https://%HTTP_HOST/$1 [R=301,L]
    – George Udosen
    Jan 14 at 12:20










  • Thank you. Should I put it in the ssl.conf file under <VirtualHost_default_:443 ?
    – adam86
    Jan 14 at 12:23










  • This should be in the .htaccess file and you should have a line Redirect permanent / https://<your_site_name>/ in the <VirtualHost *:80></VirtualHost> block in your site conf file
    – George Udosen
    Jan 14 at 12:30











  • .htaccess - it's not there
    – adam86
    Jan 14 at 13:10










  • Place it here /etc/httpd/conf.d/zzz_otrs.conf from docs I have seen, yours might be called differently
    – George Udosen
    Jan 14 at 13:14













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I've installed OTRS 6 on CentOS7 to exlpore it's features and I struggle to make it available via https. It installs Apache, and I have installed the mod_ssl module, created a self-signed certificate and modified the ssl.conf file to point to the private key and the certificate file. When I access the web page via https://server/otrs/index.pl I get the self-signed certificate warning and I'm able to access it but I can still access it via HTTP. Few google searches later I'm still not able to prevent or re-direct all HTTP requests to https. I've found this article Using an SSL certificate with OTRS and it says to put the following lines in the HTTP virtual host configuration:



RewriteEngine On 
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_HOST%REQUEST_URI


But the problem is that in my ssl.conf there is no section for HTTP virtual host, I can see only one for HTTPS <VirtualHost_default_:443



What am I doing wrong? Any help is much appreciated!







share|improve this question














I've installed OTRS 6 on CentOS7 to exlpore it's features and I struggle to make it available via https. It installs Apache, and I have installed the mod_ssl module, created a self-signed certificate and modified the ssl.conf file to point to the private key and the certificate file. When I access the web page via https://server/otrs/index.pl I get the self-signed certificate warning and I'm able to access it but I can still access it via HTTP. Few google searches later I'm still not able to prevent or re-direct all HTTP requests to https. I've found this article Using an SSL certificate with OTRS and it says to put the following lines in the HTTP virtual host configuration:



RewriteEngine On 
RewriteCond %HTTPS off
RewriteRule (.*) https://%HTTP_HOST%REQUEST_URI


But the problem is that in my ssl.conf there is no section for HTTP virtual host, I can see only one for HTTPS <VirtualHost_default_:443



What am I doing wrong? Any help is much appreciated!









share|improve this question













share|improve this question




share|improve this question








edited Jan 14 at 17:03









George Udosen

1,112318




1,112318










asked Jan 14 at 11:24









adam86

12728




12728











  • Try this rule: RewriteRule ^(.*) https://%HTTP_HOST/$1 [R=301,L]
    – George Udosen
    Jan 14 at 12:20










  • Thank you. Should I put it in the ssl.conf file under <VirtualHost_default_:443 ?
    – adam86
    Jan 14 at 12:23










  • This should be in the .htaccess file and you should have a line Redirect permanent / https://<your_site_name>/ in the <VirtualHost *:80></VirtualHost> block in your site conf file
    – George Udosen
    Jan 14 at 12:30











  • .htaccess - it's not there
    – adam86
    Jan 14 at 13:10










  • Place it here /etc/httpd/conf.d/zzz_otrs.conf from docs I have seen, yours might be called differently
    – George Udosen
    Jan 14 at 13:14

















  • Try this rule: RewriteRule ^(.*) https://%HTTP_HOST/$1 [R=301,L]
    – George Udosen
    Jan 14 at 12:20










  • Thank you. Should I put it in the ssl.conf file under <VirtualHost_default_:443 ?
    – adam86
    Jan 14 at 12:23










  • This should be in the .htaccess file and you should have a line Redirect permanent / https://<your_site_name>/ in the <VirtualHost *:80></VirtualHost> block in your site conf file
    – George Udosen
    Jan 14 at 12:30











  • .htaccess - it's not there
    – adam86
    Jan 14 at 13:10










  • Place it here /etc/httpd/conf.d/zzz_otrs.conf from docs I have seen, yours might be called differently
    – George Udosen
    Jan 14 at 13:14
















Try this rule: RewriteRule ^(.*) https://%HTTP_HOST/$1 [R=301,L]
– George Udosen
Jan 14 at 12:20




Try this rule: RewriteRule ^(.*) https://%HTTP_HOST/$1 [R=301,L]
– George Udosen
Jan 14 at 12:20












Thank you. Should I put it in the ssl.conf file under <VirtualHost_default_:443 ?
– adam86
Jan 14 at 12:23




Thank you. Should I put it in the ssl.conf file under <VirtualHost_default_:443 ?
– adam86
Jan 14 at 12:23












This should be in the .htaccess file and you should have a line Redirect permanent / https://<your_site_name>/ in the <VirtualHost *:80></VirtualHost> block in your site conf file
– George Udosen
Jan 14 at 12:30





This should be in the .htaccess file and you should have a line Redirect permanent / https://<your_site_name>/ in the <VirtualHost *:80></VirtualHost> block in your site conf file
– George Udosen
Jan 14 at 12:30













.htaccess - it's not there
– adam86
Jan 14 at 13:10




.htaccess - it's not there
– adam86
Jan 14 at 13:10












Place it here /etc/httpd/conf.d/zzz_otrs.conf from docs I have seen, yours might be called differently
– George Udosen
Jan 14 at 13:14





Place it here /etc/httpd/conf.d/zzz_otrs.conf from docs I have seen, yours might be called differently
– George Udosen
Jan 14 at 13:14
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f417001%2fapache-mod-ssl-http-to-https%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f417001%2fapache-mod-ssl-http-to-https%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?