Fully disable https for new domain

jonakoudijs

Verified User
Joined
Apr 4, 2013
Messages
8
If domains are added it is also accessible through https/443. Even if the SSL option is not enabled on the user.
Ofcourse this is a logical behavior, because now it will just try to open the default page through https (Apache is functioning normally).

Is there a way to fully disable the https connection as a default for new domains (connection denied error etc.)?
Another option could be to disable only the default https (Apache is functioning normally), is this possible?

I am curious if anyone wanted/tried this before (and ofcourse if they succeeded).
 
Ah I see! Hmm to bad there is not a really solutions for this.
I still think there must be something possible with the default SSL (apache is functioning normally)..

If I find something, I will post it here!
 
Allright I tried a couple of things and it should be possible and there are a few ways to do it, depending on your needs. The problem is that it there is a change that these changes will be rewritten through Apache and/or DirectAdmin updates.

I ended up giving the user a error if the websites has no SSL enabled.

What I did was disabling the SSL (in DirectAdmin) on the specific users.
Then I edited the default vhost file: /etc/httpd/conf/extra/httpd-vhosts.conf

I uncommented the SSL part:

Code:
#<VirtualHost xxx.xxx.xxx.xxx:443>
#    ServerAdmin webmaster@localhost
#    AliasMatch ^/~([^/]+)(/.*)* "/home/$1/public_html$2"
#    DocumentRoot /var/www/html
#    ServerName localhost
#    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
#    CustomLog /var/log/httpd/homedir.log homedir
#
#    SSLEngine on
#    SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
#    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
#</VirtualHost>

and added a new part:

Code:
#<VirtualHost xxx.xxx.xxx.xxx:443>
some not working code
#</VirtualHost>

the not working code is a a rewrite/redirect code, but I couldn't got it work, hopefully I will in the upcoming days.
But the vHost concering :443 is not working and giving back the error. And that is exactly what I needed.
 
Back
Top