"with www" or "without www", this is the problem

i have created a new virtual server to my domain by v.m.
at first days (2-3) it only works with www. and donot work without it after these days every thing changes and it works without www and do not work with www. this is my zone file : can any one help me?

$ttl 38400
@ IN SOA new.ezzi.net. root.new.ezzi.net. (
1195663948
10800
3600
604800
38400 )
@ IN NS new.ezzi.net.
mydomain.com. IN A 73.21.250.50
www.mydomain.com. IN A 73.21.250.50
ftp.mydomain.com. IN A 73.21.250.50
m.mydomain.com. IN A 73.21.250.50
mail.mydomain.com. IN A 73.21.250.50
mydomain.com. IN MX 5 mail.mydomain.com.
ns1.mydomain.com. IN A 73.21.250.51
ns2.mydomain.com. IN A 73.21.250.52

allen_green wrote:

i have created a new virtual server to my domain by v.m. at first days (2-3) it only works with www. and donot work without it after these days every thing changes and it works without www and do not work with www. this is my zone file : can any one help me?

$ttl 38400
@ IN SOA new.ezzi.net. root.new.ezzi.net. (
1195663948
10800
3600
604800
38400 )
@ IN NS new.ezzi.net.
mydomain.com. IN A 73.21.250.50
www.mydomain.com. IN A 73.21.250.50
ftp.mydomain.com. IN A 73.21.250.50
m.mydomain.com. IN A 73.21.250.50
mail.mydomain.com. IN A 73.21.250.50
mydomain.com. IN MX 5 mail.mydomain.com.
ns1.mydomain.com. IN A 73.21.250.51
ns2.mydomain.com. IN A 73.21.250.52

what about the apache config?

my apache config is:
<VirtualHost 73.21.250.50:80>
SuexecUserGroup "#502" "#503"
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot /home/mydomain/public_html
ErrorLog /home/mydomain/logs/error_log
CustomLog /home/mydomain/logs/access_log combined
ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/mydomain/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All
</Directory>
<Directory /home/mydomain/cgi-bin>
allow from all
</Directory>
</VirtualHost>

Both the zone and the Apahce VirtualHost looks fine.

You might review this section of the troubleshooting guide:

http://www.virtualmin.com/documentation/id,troubleshooting_common_problems/#the_wrong_site_shows_up

And if that doesn’t get you pointed in the right direction, come back with a description of what is actually happening. You say it doesn’t work…but there’s all sorts of ways for something to go wrong. Do you get an error? What kind? Is there anything in the access_log or error_log for the VirtualHost in question when you make a request that doesn’t work?

thank you for your reply,
i couldn’t find any useful points,
when i browse http://mydomian.com there is no problem,
but http://www.mydomain.com:

Server not found

Firefox can’t find the server at www.mydomain.com.
* Check the address for typing errors such as
ww.example.com instead of
www.example.com

*   If you are unable to load any pages, check your computer's network connection.

*   If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.</b>

i checked both access_log and error_log there was no log for this request!!

It sounds like a DNS problem them, do an nslookup and see if it’s even finding an IP.