When you can access the DirectAdmin control panel using the server IP and port (https://<your-server-ip>:2222), but not through your domain (e.g., https://mana.org:2222), it usually means that DNS or configuration issues are causing the problem. Below are steps to help you resolve the issue:
1. Ensure DNS Records Are Correct
Verify that your domain (mana.org) correctly points to your server's IP address. On your DNS provider, ensure settings like these are configured:
- A Record:
mana.org points to your server's IP.
- A Record (optional):
admin.mana.org points to your server's IP (optional subdomain for managing DirectAdmin)
- Check propagation: Use tools like WhatsMyDNS to ensure the DNS changes have propagated.
2. Check the DirectAdmin Configuration
DirectAdmin needs to be configured to recognize your domain name instead of only the IP address:
-
Open the DirectAdmin configuration file:
/usr/local/directadmin/conf/directadmin.conf
-
Ensure servername has your domain name set (mana.org):
servername=mana.org
-
Save and restart DirectAdmin:
service directadmin restart
3. Adjust Custom Port Access
If you're trying to use DirectAdmin through the domain plus the custom 2222 port (e.g., mana.org:2222), ensure the port is open and allowed through the firewall:
-
Check Firewall Rules:
sudo iptables -L -n | grep 2222
OR
sudo ufw status
-
If the port isn't open, you can allow it using:
sudo ufw allow 2222/tcp
sudo ufw reload
-
Verify the port is listening:
sudo netstat -tuln | grep 2222
4. Set Up SSL for Secure Access
If you're accessing the DirectAdmin panel using HTTPS (https://mana.org:2222), make sure your SSL certificate is properly configured:
-
Generate or install an SSL certificate for mana.org through DirectAdmin or a tool like Let's Encrypt.
-
Set DirectAdmin to use the SSL certificate:
cd /usr/local/directadmin/conf/
nano directadmin.conf
Ensure the following values are set:
ssl=1
cacert=/usr/local/directadmin/conf/cacert.pem
cert=/usr/local/directadmin/conf/cert.pem
key=/usr/local/directadmin/conf/key.pem
-
After making these changes, restart DirectAdmin:
service directadmin restart
5. Confirm Browser Access
After the above steps, test if you can access DirectAdmin on a browser:
- Visit:
https://mana.org:2222
- If there are SSL errors, ensure that a proper SSL certificate is in place.
6. Consider Using a Subdomain (Optional)
It is common to run the DirectAdmin panel on a subdomain like admin.mana.org. If you want to set this up:
-
Add a DNS A Record:
admin.mana.org -> <your-server-ip>
-
Update the DirectAdmin configuration file:
servername=admin.mana.org
-
Restart DirectAdmin:
service directadmin restart
-
Access the panel at: https://admin.mana.org:2222
7. Test and Debug
If the above steps don’t work, review the DirectAdmin log files for possible errors:
/var/log/directadmin/error.log
Let me know if you have more details or encounter specific issues, and I can help further!