Troubles with httpd.conf

IPaddress

Verified User
Joined
Feb 21, 2004
Messages
92
Hi!

I'm having this problem:

For some reason, from time to time my client complains that he gets "500 internal server error" when he tries to have access to his site.
This problem is caused by httpd.conf file, that adds a wrong path to the docuemntroot location.

Is always the same, here an example:

It changes the following lines

DocumentRoot /home/username/domains/domain.com/public_html/subdomain/subdomain_user/web//subdomain_user
ScriptAlias /cgi-bin/ /home/username/domains/domain.com/public_html/subdomain/subdomain_user/web/cgi-bin//subdomain_user

<Directory /home/username/domains/domain.com/public_html/subdomain/subdomain_user/web//subdomain_user>

As you can see, it adds the subdomain_user to the end of the line, and then is when the site shows 500 error.
Any idea on how to solve this?

Thanks a lot!
 
Last edited:
Do you have modified templates:

/usr/local/directadmin/data/templates/custom/virtual_host2.conf
/usr/local/directadmin/data/templates/custom/virtual_host2_secure.conf
/usr/local/directadmin/data/templates/custom/virtual_host2_secure_sub.conf
/usr/local/directadmin/data/templates/custom/virtual_host2_sub.conf
/usr/local/directadmin/data/templates/custom/virtual_host.conf
/usr/local/directadmin/data/templates/custom/virtual_host_secure.conf
/usr/local/directadmin/data/templates/custom/virtual_host_secure_sub.conf
/usr/local/directadmin/data/templates/custom/virtual_host_sub.conf

What exactly did you check?

Directadmin Admin Login -> Add Custom Httpd Configurations -> Select a certain domain

Is there any code in top text area box (called Httpd.conf Customization for)? Are there any tockens?
 
Remember also that changed user-specific httpd.conf files will be changed by DirectAdmin. So either move the templates to the custom subdirectory and change them there, or make your changes to the user-specific httpd.conf files (if you must) then chattr them immutable so DirectAdmin can't change them.

Or make all your changes in the custom httpd configuration section of the admin login, if that works for you.

Jeff
 
Jeff:

Could you be more specific with your answer?
I couldn't find the files that you refer to, so I can't check what you are saying.

Thanks a lot for your answers everyone!
 
Actually I mis-wrote. There's no custom directory for the user-specific httpd.conf files; you need to chattr them immutable if you don't want DirectAdmin to change them.

The user-specific httpd.conf files can be found this way:
Code:
# ls -al /usr/local/directadmin/data/users/*/httpd.conf
You can make limited changes through the custom httpd configurastion section of the admin login.

Jeff
 
Back
Top