DA on subdomain instead of IP Error

muhaki

New member
Joined
Sep 9, 2020
Messages
8
Hi guys,

Instead of accessing DA from IP, i want to access it from domain, eg. server.domain.com

I have followed the guide A here: https://help.directadmin.com/item.php?id=84
But i get 500 proxy error:

Proxy Error
The proxy server could not handle the request
Reason: Error during SSL Handshake with remote server

How can i resolve this issue? Is the guide outdated?
 
Do you wish to access directadmin from domain.com:2222 or just from domain.com? I'm asking because your link indicates the second one, but title of post states the first one :)
 
I wish to access directadmin from subdomain like server.domain.com, without the port :)
 
If you turn off the SSL, does the access to the DA work? Are you using Nginx, Nginx+Apache or just Apache?
 
If you turn off the SSL, does the access to the DA work? Are you using Nginx, Nginx+Apache or just Apache?
It doesnt work either. Its just apache i think. I used the default installation.
 
Hm.. Check DA's error log. Anything weird in it?
 
Yes i see this:

Code:
dns_rdata_fromtext: /etc/bind/server.domain.com.db.temp.950232:30: near 'server.domain.com': bad dotted quad
zone server.domain.com/IN: loading from master file /etc/bind/server.domain.com.db.temp.950232 failed: bad dotted quadzone server.domain.com/IN: not loaded due to errors.

2020:09:10-20:30:24: Can't connect to ssl!
 
Ok first step you should be run without https to makesure your proxy work correctly.

- Turn off https and connect with http then see log again
SSLProxyEngine on -> SSLProxyEngine off
 
I managed to make it work with cp.domain.com:2222.
But not sure how to make it work without the port.
 
This is what i did:
1. Created a new domain called cp.domain.com at User level.
2. Went to Admin Level -> Custom HTTPD Configuration -> cp.domain.com -> httpd.conf -> CUSTOMIZE
3. Pasted this configuration on the top Textarea:

Code:
|*if SSL_TEMPLATE="1"|
|?HAVE_PHP1_FCGI=0|
|?HAVE_PHP2_FCGI=0|
|?HAVE_PHP1_FPM=0|
|?HAVE_PHP2_FPM=0|
|?CLI=0|
|?HAVE_PHP1_CLI=0|
|?HAVE_PHP2_CLI=0|
|?SUPHP=0|
|?HAVE_PHP1_SUPHP=0|
|?HAVE_PHP2_SUPHP=0|
       ProxyRequests off
       SSLProxyEngine on

       ProxyPass /phpmyadmin !
       ProxyPass /phpMyAdmin !
       ProxyPass /webmail !
       ProxyPass /roundcube !

       ProxyPass / https://server.domain.com:2222/
       ProxyPassReverse / https://server.domain.com:2222/
       #ProxyPreserveHost On
|*else|
       RewriteEngine On
       RewriteCond %{HTTPS} off
       RewriteCond %{REQUEST_URI} !^/.well-known
       RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|*endif|

I can now access DA from cp.domain.com:2222 (without https, it gives me "Error 500, Proxy Error: Reason: Error during SSL Handshake with remote server " message instead)

So far so good.
What can i do now ? :D
 
Last edited:
Okay i finally figured it out.

The issue was that my DNS records hostname (server.domain.com) was set completely wrong to begin with.
A records was pointing to domain name instead of IP.
NS records was pointing to IP adress.

What i did, was completely removing all records and adding them again.

I can now access cp.domain.com with https and without port.

Ty for your help guys!
 
Back
Top