httpd.conf customization question

Dr. Reddog

New member
Joined
Jul 8, 2023
Messages
3
Hello,

I am running a web server with two IP addresses, and I would like to choose which web sites go on which IP address. Through trial and error, I have found that if I edit /usr/local/directadmin/data/users/admin/httpd.conf, and change the IP addresses in the <VirtualHost> blocks, I can get the desired behavior. However, this file is autogenerated by DirectAdmin, and I would have to edit this file every single time that a domain gets added or removed. Arg! Can anyone recommend a workaround, and how I should do this in a more stable manner in DirectAdmin? A complication is that I have DirectAdmin personal, so I only have a single admin account.

THANK YOU!
Dr. Reddog
 
There are two ways:
1. preffered - create separate account for this domain and assign it this IP (before it make IP shared, this will allow you to assign this ip for many accounts)
2. if your license don't allow you to create few accounts - assign both IPs for your admin accounts, then at domain management you will be able to select which IP for which domain.
 
Because of the limit on my license, I need to choose option #2.

I go to Admin / Server Manager / IP Management, and I assign the 2nd IP to "admin", which is the only administrator on the system. There does not appear to be a way to assign the first IP to admin (the Assign button is greyed out), but I think that is assigned to admin by default.


Capture.JPG

Then I go to User / Account Manager / Domain Management, and there is no place to assign a specific IP to a domain.

Also, when I go to Admin / Account Manager / Show All Users, it only shows the first IP (...184) as belonging to admin, and I don't see a way to assign multiple IPs to admin. How can I set things up so that I can assign the second IP (...252) to one of the domains (and have them both listed as valid IPs for admin in "Show All Users")?

Thanks for any help that you can give!!!
Dr. Reddog
 
status - free, so IP owned by admin but still not assigned to him. Modify admin account to assign him this IP, I don't have such license to make screenshots and show how.
 
In my old skin - show all users - click on admin - then modify admin
 

Attachments

  • 09-07-2023 09-47-19.jpg
    09-07-2023 09-47-19.jpg
    154.7 KB · Views: 4
  • 09-07-2023 09-47-53.jpg
    09-07-2023 09-47-53.jpg
    125.2 KB · Views: 4
Thank you, Zhenyapan! This solution worked for me. I very much appreciate your help and expertise on this!

Best Regards,
Dr. Reddog
 
Back
Top