osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [users@httpd] Problem setting up ssl


Hi here is a copy of docs in PDF… page 150 is what I think you may find useful. So basically in the example it shows redirecting example.com to www.example.com but exactly the same principle can be used to redirect http://example.com to https://example.com just be sure to apply all the SSL settings to the new Virtual Host you have created. :) 

Attachment: apache2.pdf
Description: Adobe PDF document


This is maybe not the best or most elegant way to accomplish this, but it’s a way that works :)
Regards,
Angel


On 20 Aug 2018, at 15:36, Mahmood Naderan <nt_mahmood@xxxxxxxxx.INVALID> wrote:

>Is mod_ssl actually loaded/enabled?
>Try removing the <IfModule..> </IfModule> lines and check your
>httpd config syntax (apache2ctl -S)




root@webshub:~# grep IfModule /etc/apache2/sites-available/default-ssl.conf
#<IfModule mod_ssl.c>
#</IfModule>
root@webshub:~# apachectl -S
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80                   127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
# apachectl -M | grep ssl_module
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
 ssl_module (shared)






>You could take a look at settings for ‘Redirects' in the Apache2 online docs too

?



Regards,
Mahmood