Apache stops after a user account is deleted

ATB

Verified User
Joined
Oct 28, 2007
Messages
8
Location
KZ
When I delete a user account in DA, apache stops working.
If I try to restart apache via SHH, is says "can not find /usr/local/directadmin/data/users/username/httpd.conf"
thought this line that includes the path is deleted from /etc/httpd/conf/httpf.conf

Could anyone help, please?
 
edit /etc/httpd/conf/httpd.conf and remove the following line.

Include /usr/local/directadmin/data/users/username/httpd.conf

replace the username with the user account you just deleted.

Then restart httpd
 
The line is removed by DirectAdmin after I select a user account and press delete, I guess what happens then is apache tries to restart and fails. I just want to find the root cause, so I dont have to edit the file evertime I delete an account.
 
I have the same issue - I can remove the line everytime I delete a user but it's just uncomfortable.
I've realised that it started to work wrond after installing custombuild (I had with this lots of problems too).
I was looking for some solution but still have nothing.
If you find some, please write it here.

Good luck and thanks in advance.

Ater 15 minutes... ;)
OK, I've found something.
I guess custombild has rewritten the httpd.conf and split it into several files that are included from extra directory.
My directadmin version is not the most recent one so I think it looks for a line to delete in httpd.conf but it should look in extra/directadmin-vhosts.conf - for new users it adds a line to httpd.conf

It might be described not very well but if you look into those files you'll understand everything. If not - write me on priv.

I'll try to upgrade my DA in few days so I'll know if it works with extra/directadmin-vhosts.conf correctrly.
 
Last edited:
The following commands should fix your problem:
Code:
perl -pi -e 's#apacheconf=/etc/httpd/conf/httpd.conf#apacheconf=/etc/httpd/conf/extra/directadmin-vhosts.conf#' /usr/local/directadmin/conf/directadmin.conf[FONT=monospace]
[/FONT]echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
 
Does this have to be run each time the problem occurs? Or only once on the server?

Thanks.

Jeff
 
It's done automatically when you run CustomBuild for the first time. But if you modify directadmin.conf or rewrite it (with a new DA installation) it sets an old value (/etc/httpd/conf/httpd.conf), so in this way you have to execute these commands again (change apacheconf value in directadmin.conf and restart DirectAdmin service).
 
I'm a bit confused... if I modify directadmin.conf it will rewrite the value? Or only if the particular variable gets rewritten?

Thanks.

Jeff
 
No, it won't :) CustomBuild rewrites its template in /usr/local/directadmin/data/templates folder too, so you can only damage directadmin.conf if you do that manually or if you download directadmin.conf from the other server.
 
Back
Top