An httpd issue

carlgale

Verified User
Joined
Oct 12, 2006
Messages
34
Hi

Could someone give me a pointer please with an httpd issue I am having.

I installed a domain and then created wildcard sub domains, however I made a mistake when creating them. I created just *.domain rather than ServerAlias *.domain. I went and fixed this in the /usr/local/directadmin/data/users/reselleraccountinquestion/httpd.conf: file and restarted my server. All was fine from this point onwards and the wildcards worked.

However, I have now added several more domains into the same reseller account and it is reverting back to the *domain.com problem. I have created all the wildcard subs for the new domains correctly but the httpd seems to keep overwriting the original *.domain.com I did wrong and corrected. Because of this it makes httpd fail and when I try and restart it it tells me


Starting httpd: Syntax error on line 161 of /usr/local/directadmin/data/users/reselleraccountinquestion/httpd.conf:
Invalid command '*.', perhaps misspelled or defined by a module not included in the server configuration

I can fix the issue easy enough by going back and editing the file again but I would rather not have to edit this file each time I wish to add a new domain.

Anyone know a solution please

Carl
 
You should edit the template in /usr/local/directadmin/data/templates/

copy virtual_host2.conf in /usr/local/directadmin/data/templates/custom/

and edit it.

Just take care cause this will be the default template for each domain (old and new).

For rewrite the httpd.conf for each user using the template run:

Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue 
/usr/local/directadmin/dataskq d800

Regards
 
@Carl,

Please read this article, it might be helpful to you. Of course if you need a wildcard only for one specific domain, not for all. If you need wildcard for all hostied domains of yours, then you'd better update template file, as Andrea has already mentioned above.
 
Back
Top