-1

When i try to visit I am able to access the site but I do not see the 'S" in the https://

I did my

  1. apachectl configtest

  2. apachectl stop

  3. apachectl start

  4. a2ensite default-ssl.conf

  5. a2ensite teampass.conf

  6. /etc/init.d/apache2 restart

I configured my virtualhost in /etc/apache2/sites-available/default-ssl.conf:

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName teampass.domain.org
        Serveralias www.teampass.domain.org
        DocumentRoot /var/www/html/teampass

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        SSLEngine on

        SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
        SSLCertificateFile /etc/apache2/ssl/star_domain_org
        SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
</VirtualHost>

this is my /etc/apache2/sites-available/teampass.conf

<VirtualHost *:80>
    Redirect permanent / https://teampass.domain.org/
    ServerAdmin webmaster@localhost
    ServerName teampass.domain.org
    ServerAlias www.teampass.domain.org
    DocumentRoot /var/www/html/teampass
    <Directory /var/www/html/teampass>
            AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine on
    SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
    SSLCertificateFile /etc/apache2/ssl/star_domain_org
    SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
</VirtualHost>


<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName teampass
        ServerAlias www.teampass.domain.org
        DocumentRoot /var/www/html/teampass

        SSLCertificateFile /etc/apache2/ssl/star_domain_org
        SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
        SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
        SSLEngine on
        ErrorLog ${APACHE_LOG_DIR}/teampass_error.log
        CustomLog ${APACHE_LOG_DIR}/teampass_access.log combined

        <IfModule mod_rewrite.c>
                # DO NOT REMOVE
                RewriteOptions Inherit
        </IfModule>
</VirtualHost>

This is my /etc/apache2/ports.conf

Listen 80
<IfModule ssl_module>
        Listen 443 http
</IfModule>

<IfModule mod_gnutls.c>
        listen 443 http
</IfModule>
Froggiz
  • 3,043
  • 1
  • 19
  • 30
Lolu911
  • 11
  • 2
  • 8

1 Answers1

0

In your port.conf change

Listen 80
<IfModule ssl_module>
        Listen 443 http
</IfModule>

<IfModule mod_gnutls.c>
        listen 443 http
</IfModule>

by

Listen 80
<IfModule ssl_module>
        Listen 443
</IfModule>

Default 443 is already https if you set http right after, it will server http content on port 443

This is the configuration you need:

/etc/apache2/sites-available/default-ssl.conf:

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName teampass.domain.org
        Serveralias www.teampass.domain.org
        DocumentRoot /var/www/html/teampass

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        SSLEngine on

        SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
        SSLCertificateFile /etc/apache2/ssl/star_domain_org
        SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
</VirtualHost>

/etc/apache2/sites-available/teampass.conf

<VirtualHost *:80>
    Redirect permanent / https://teampass.domain.org/
    ServerAdmin webmaster@localhost
    ServerName teampass.domain.org
    ServerAlias www.teampass.domain.org
    DocumentRoot /var/www/html/teampass
    <Directory /var/www/html/teampass>
            AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName teampass
        ServerAlias www.teampass.domain.org
        DocumentRoot /var/www/html/teampass

        SSLCertificateFile /etc/apache2/ssl/star_domain_org
        SSLCertificateKeyfile /etc/apache2/ssl/teampass.key
        SSLCACertificateFile /etc/apache2/ssl/DigiCertCA
        SSLEngine on
        ErrorLog ${APACHE_LOG_DIR}/teampass_error.log
        CustomLog ${APACHE_LOG_DIR}/teampass_access.log combined

        <IfModule mod_rewrite.c>
                # DO NOT REMOVE
                RewriteOptions Inherit
        </IfModule>
</VirtualHost>
Froggiz
  • 3,043
  • 1
  • 19
  • 30
  • Thank you for your help, however it did not solve the problem. I made changes in the port.conf and also commented out from both default-ssl.conf and also teampass.conf. I made changes to the Certificate files as well but still serves with http. @Froggiz – Lolu911 Nov 24 '15 at 14:35
  • thank you @Forggiz for your consistant input. Redirect permanent / https://teampass.domain.org/ is in default-ssl.conf . currently IE says " This page can’t be displayed" . Chrome says "This webpage has a redirect loop ERR_TOO_MANY_REDIRECTS" .. I am not able to view the page at this point. – Lolu911 Nov 24 '15 at 15:03
  • is that for default-ssl.conf or teampass.conf ? – Lolu911 Nov 24 '15 at 15:19
  • @Frogiz , I cant even explain lol. Alot of names i wanted to use was taken already i guess. lol – Lolu911 Nov 24 '15 at 15:32
  • it did not work. should i put this same file from default-ssl.conf in teampass.conf ? these are the files i have in sites available. the editing you did, i put it in default-ssl.conf. root@teampass:/etc/apache2/sites-available# ls \ default-ssl.conf teampass.conf 000-default.conf index.html teampass.conf.bak – Lolu911 Nov 24 '15 at 15:48
  • currently IE cant find the page but Chrome can in http. @Froggiz – Lolu911 Nov 24 '15 at 15:57
  • okay Chrome is trying to access it through https but page cant be found. I am now playing around with the permissions. @Froggiz – Lolu911 Nov 24 '15 at 16:12
  • I added index.php to /var/www/html and also in dir.conf in mods-available. and still dont work. @Froggiz and yes I will – Lolu911 Nov 24 '15 at 16:55
  • so It finally worked. thank you soo much for your help. it was my fault , if you look at my document root. I had /var/www/html/teampass instead of /var/www/html . – Lolu911 Nov 24 '15 at 18:10