Sub Domains not resolving

webone

Verified User
Joined
Jan 17, 2004
Messages
61
A customer recently asked about sub domains. The subdomain example.hersite.com has been set up correctly in DA as far as I can tell. The folder "example" has been created inside her public_html folder and contains the usual cgi-bin folder.

She can access it via www.hersite.com/example/index.htm but not via example.hersite.com . . . it just comes up as page not found.

What could be the problem? I tried setting up a sub domain on my own DA server and found the same problem!

Any help much appreciated!

Thanks,
 
With real information it's possible to troubleshoot.

Without real information, it's impossible.

Jeff
 
Was apache restarted? You might try doing it manually none the less. Check that users httpd.conf file and make sure the virtualhost for that subdomain were created properly.
 
With real information it's possible to troubleshoot.

I'm loath to do that because my primary concern is the security of my server and my client. But if you're sure neither will be compromised then I've included the users httpd.conf file.

Was apache restarted? You might try doing it manually none the less. Check that users httpd.conf file and make sure the virtualhost for that subdomain were created properly.

Thanks for that! Yes, I restarted apache . . . manually too. I don't see the vh you mention. Can I add it manually . . . if so, how exactly, and do you know perhaps why DA isn't adding this in correctly? Should this be a ticket issue to DA support?

Thanks for any further help you can provide.

Code:
# Auto generated apache config file by DirectAdmin version 1.23.4
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to his/her website

# Frontpage requires these parameters in every httpd.conf file or else
# it won't work.
Port 80
ServerRoot /etc/httpd


<VirtualHost 67.19.117.186:80>


	ServerName [url]www.find-small-business-software.com[/url]
	ServerAlias [url]www.find-small-business-software.com[/url] find-small-business-software.com 
	ServerAdmin [email][email protected][/email]
	DocumentRoot /home/findsma/domains/find-small-business-software.com/public_html
	ScriptAlias /cgi-bin/ /home/findsma/domains/find-small-business-software.com/public_html/cgi-bin/

	UseCanonicalName OFF

	User findsma
	Group findsma
	CustomLog /var/log/httpd/domains/find-small-business-software.com.bytes bytes
	CustomLog /var/log/httpd/domains/find-small-business-software.com.log combined
	ErrorLog /var/log/httpd/domains/find-small-business-software.com.error.log

	<Directory /home/findsma/domains/find-small-business-software.com/public_html>
		Options +Includes -Indexes
		php_admin_flag engine ON
		php_admin_flag safe_mode OFF
		php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email][email protected][/email]'
	</Directory>



	#php_admin_value open_basedir /home/findsma/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/

</VirtualHost>


<VirtualHost 67.19.117.186:443>

	SSLEngine on
	SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
	SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
	

	ServerName [url]www.find-small-business-software.com[/url]
	ServerAlias [url]www.find-small-business-software.com[/url] find-small-business-software.com 
	ServerAdmin [email][email protected][/email]
	DocumentRoot /home/findsma/domains/find-small-business-software.com/private_html
	ScriptAlias /cgi-bin/ /home/findsma/domains/find-small-business-software.com/public_html/cgi-bin/

	UseCanonicalName OFF

	User findsma
	Group findsma
	CustomLog /var/log/httpd/domains/find-small-business-software.com.bytes bytes
	CustomLog /var/log/httpd/domains/find-small-business-software.com.log combined
	ErrorLog /var/log/httpd/domains/find-small-business-software.com.error.log

	<Directory /home/findsma/domains/find-small-business-software.com/private_html>
		Options +Includes -Indexes
		php_admin_flag engine ON
		php_admin_flag safe_mode OFF
		php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email][email protected][/email]'
	</Directory>



	#php_admin_value open_basedir /home/findsma/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/

</VirtualHost>

<VirtualHost 67.19.117.186:80>


	ServerName [url]www.tools.find-small-business-software.com[/url]
	ServerAlias [url]www.tools.find-small-business-software.com[/url] tools.find-small-business-software.com
	ServerAdmin [email][email protected][/email]
	DocumentRoot /home/findsma/domains/find-small-business-software.com/public_html/tools
	ScriptAlias /cgi-bin/ /home/findsma/domains/find-small-business-software.com/public_html/tools/cgi-bin/
	
	UseCanonicalName OFF

	User findsma
	Group findsma
	CustomLog /var/log/httpd/domains/find-small-business-software.com.tools.bytes bytes
	CustomLog /var/log/httpd/domains/find-small-business-software.com.tools.log combined
	ErrorLog /var/log/httpd/domains/find-small-business-software.com.tools.error.log
	<Directory /home/findsma/domains/find-small-business-software.com/public_html/tools>
		Options +Includes -Indexes
		php_admin_flag engine ON
		php_admin_flag safe_mode OFF
		php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email][email protected][/email]'
	</Directory>


	
	#php_admin_value open_basedir /home/findsma/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/

</VirtualHost>


<VirtualHost 67.19.117.186:443>

	SSLEngine on
	SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
	SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
		

	ServerName [url]www.tools.find-small-business-software.com[/url]
	ServerAlias [url]www.tools.find-small-business-software.com[/url] tools.find-small-business-software.com
	ServerAdmin [email][email protected][/email]
	DocumentRoot /home/findsma/domains/find-small-business-software.com/private_html/tools
	ScriptAlias /cgi-bin/ /home/findsma/domains/find-small-business-software.com/public_html/tools/cgi-bin/

	UseCanonicalName OFF

	User findsma
	Group findsma
	CustomLog /var/log/httpd/domains/find-small-business-software.com.tools.bytes bytes
	CustomLog /var/log/httpd/domains/find-small-business-software.com.tools.log combined
	ErrorLog /var/log/httpd/domains/find-small-business-software.com.tools.error.log

	<Directory /home/findsma/domains/find-small-business-software.com/private_html/tools>
		Options +Includes -Indexes
		php_admin_flag engine ON
		php_admin_flag safe_mode OFF
		php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email][email protected][/email]'
	</Directory>



	#php_admin_value open_basedir /home/findsma/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/

</VirtualHost>
 
It appears that the domain isn't resolving. If the "tools" A record exists for the domain in your DNS Management, you probably need to restart named.
 
ballyn said:
It appears that the domain isn't resolving. If the "tools" A record exists for the domain in your DNS Management, you probably need to restart named.

Woo hoo! That worked! Thanks!

So why is that? Will I have to restart named each time a subdomain is added? Do you think this could be a bug or something I'm doing wrong?

Any advice appreciated!
 
All necassary services should be restarted when configuration changes have been made. If they are not, check the init script names and make sure they are the same as what DirectAdmin expects. I had this recently where a MySQL upgrade changed the name of the startup script.

It could also be a bug, but you should check what I mentioned above before emailing DirectAdmin with system information regarding this problem.
 
Back
Top