0

So I have a sub-domain that is secured using a godaddy ssl. what I would like to do is have the standard 443 port secured as well as port 2443 so when going to https://secure.domain.com its secured as it should be and then when going to https://secure.domain.com:2443 it is also secured. The 443 is the standard site and 2443 is for the control panel.

I have added the ssl entry's to the vhosts listening under 2443 and this did not get the results I was looking for. im new at this and google has not been very helpful.

this is on a lamp system. centos 6.4 apache2 Can this be done?

heres the vhosts config:

            <VirtualHost IP:80>

              SuexecUserGroup PATH PATH

              DocumentRoot /home/PATH/DOMAIN.COM/html
              ServerName DOMAIN.COM

              ServerAlias www.DOMAIN.COM ftp.DOMAIN.COM mail.DOMAIN.COM secure.DOMAIN.COM scripts.DOMAIN.COM
              ServerAlias help.DOMAIN.COM
              ServerAdmin webmaster@DOMAIN.COM

              # subdomain logic
              RewriteEngine On
              RewriteOptions inherit
              RewriteCond %{HTTP_HOST} !^www\.tandgweb\.com [NC]
              RewriteCond %{HTTP_HOST} !^PATH\.com [NC]
              RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-.]+)\.PATH\.com [NC]
              RewriteCond %{DOCUMENT_ROOT}/%1 -d
              RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
              RewriteRule ^([0-9A-Za-z-.]+)\.PATH\.com/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]

              RewriteCond %{HTTP_HOST} ^www\.([A-Z0-9a-z-.]+)\.PATH\.com [NC]
              RewriteCond %{DOCUMENT_ROOT}/%1 -d
              RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
              RewriteRule ^www\.([0-9A-Za-z-.]+)\.PATH\.com/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
              # end subdomain logic

              ErrorLog /home/PATH/var/PATH.com/logs/error.log
              CustomLog /home/PATH/var/PATH.com/logs/transfer.log combined

              # php: default  don't edit between this and the "end php" comment below
              <IfModule mod_suphp.c>
                suPHP_Engine On
                suPHP_UserGroup PATH PATH
                AddHandler x-httpd-php .php
                suPHP_AddHandler x-httpd-php .php
                suPHP_ConfigPath /home/PATH/etc
              </IfModule>

              <IfModule !mod_suphp.c>
                <IfModule mod_php5.c>
                  php_admin_flag engine On
                </IfModule>
                <IfModule mod_php4.c>
                  php_admin_flag engine On
                </IfModule>
              </IfModule>
              # end php

              # cgi: 1 don't edit between this and the "end cgi" comment below
              <Directory /home/PATH/PATH.com/html>
                AllowOverride  All
              </Directory>

              <Location />
                Options +ExecCGI
              </Location>
              ScriptAlias /cgi-bin/ /home/PATH/PATH.com/html/cgi-bin/
              # end cgi


              <IfModule mod_interworx_settings.c>
                # InterWorx adds this dummy module section to store settings
                # There is no mod_interworx_settings module
                # DO NOT DELETE

                last_update 2014-01-10 00:10:18
                iworx_controlled_ips IP:80
              </IfModule>
            </VirtualHost>
            <VirtualHost IP:443>

              SuexecUserGroup PATH PATH

              DocumentRoot /home/PATH/PATH.com/html
              ServerName PATH.com

              ServerAlias www.PATH.com ftp.PATH.com mail.PATH.com secure.PATH.com scripts.PATH.com
              ServerAlias help.PATH.com
              ServerAdmin webmaster@PATH.com

              # subdomain logic
              RewriteEngine On
              RewriteOptions inherit
              RewriteCond %{HTTP_HOST} !^www\.PATH\.com [NC]
              RewriteCond %{HTTP_HOST} !^PATH\.com [NC]
              RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-.]+)\.PATH\.com [NC]
              RewriteCond %{DOCUMENT_ROOT}/%1 -d
              RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
              RewriteRule ^([0-9A-Za-z-.]+)\.PATH\.com/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]

              RewriteCond %{HTTP_HOST} ^www\.([A-Z0-9a-z-.]+)\.PATH\.com [NC]
              RewriteCond %{DOCUMENT_ROOT}/%1 -d
              RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
              RewriteRule ^www\.([0-9A-Za-z-.]+)\.PATH\.com/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
              # end subdomain logic

              ErrorLog /home/PATH/var/PATH.com/logs/error.log
              CustomLog /home/PATH/var/PATH.com/logs/transfer.log combined

              # php: default  don't edit between this and the "end php" comment below
              <IfModule mod_suphp.c>
                suPHP_Engine On
                suPHP_UserGroup PATH PATH
                AddHandler x-httpd-php .php
                suPHP_AddHandler x-httpd-php .php
                suPHP_ConfigPath /home/PATH/etc
              </IfModule>

              <IfModule !mod_suphp.c>
                <IfModule mod_php5.c>
                  php_admin_flag engine On
                </IfModule>
                <IfModule mod_php4.c>
                  php_admin_flag engine On
                </IfModule>
              </IfModule>
              # end php

              # cgi: 1 don't edit between this and the "end cgi" comment below
              <Directory /home/PATH/PATH.com/html>
                AllowOverride  All
              </Directory>

              <Location />
                Options +ExecCGI
              </Location>
              ScriptAlias /cgi-bin/ /home/PATH/PATH.com/html/cgi-bin/
              # end cgi


             SSLEngine on
              SSLHonorCipherOrder On
              SSLCipherSuite RC4:HIGH:MEDIUM:!SSLv2:!ADH:!aNULL:!eNULL:!NULL:!LOW
              SSLCACertificatePath /home/PATH/var/PATH.com/ssl
              SSLCertificateKeyFile /home/PATH/var/PATH.com/ssl/PATH.com.priv.key
              SSLCertificateFile /home/PATH/var/PATH.com/ssl/PATH.com.crt
              SSLCACertificateFile /home/PATH/var/PATH.com/ssl/PATH.com.chain.crt
              SSLOptions +ExportCertData +StrictRequire
              SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
              <IfModule mod_interworx_settings.c>
                # InterWorx adds this dummy module section to store settings
                # There is no mod_interworx_settings module
                # DO NOT DELETE

                last_update 2014-01-10 00:10:18
                iworx_controlled_ips IP:443
              </IfModule>
            </VirtualHost>

            <VirtualHost IP:2443>
             SSLEngine on
              SSLHonorCipherOrder On
              SSLCipherSuite RC4:HIGaH:MEDIUM:!SSLv2:!ADH:!aNULL:!eNULL:!NULL:!LOW
              SSLCACertificatePath /home/PATH/var/PATH.com/ssl
              SSLCertificateKeyFile /home/PATH/var/PATH.com/ssl/PATH.com.priv.key
              SSLCertificateFile /home/PATH/var/PATH.com/ssl/PATH.com.crt
              SSLCACertificateFile /home/PATH/var/PATH.com/ssl/PATH.com.chain.crt
              SSLOptions +ExportCertData +StrictRequire
              SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
              <strong></strong>

1 Answers1

1

As noted in this answer, you can have one vhost serve multiple endpoints.

Simply change <VirtualHost IP:443> to <VirtualHost IP:443 IP:2443>
Now you get the same site/vhost on port 443 and 2443

Make sure that the config is set to listen on port 2443:

Listen 2443
NameVirtualHost IP:2443