Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a problem : I've got a dedicated server where I use three different domain names and php. Now, I've got a new website that I developped with I installed mono, mod_mono and transfered my assembly inside /var/www/mysite

My problem comes up when I try to access my website. I tried IpAdress/mysite/ but it just gives the three and if I want "IpAddress/mysite/Controller1/Action1" it says 404.

As I said my server is apache and is used with php websites which has several domain names. As one of those domain name can be used for my own website, I tried to create a subdomain name let's say Here is the content of the file /etc/apache/sites-enabled/

 <VirtualHost *:80>
    ServerAdmin web-admin@mysite
    DocumentRoot /var/www/mysite

    MonoServerPath "/usr/bin/mod-mono-server2"
    MonoSetEnv MONO_IOMAP=all

    MonoApplications "/:/var/www/mysite"
    <Location "/">
      Allow from all
      Order allow,deny
      SetHandler mono
      SetOutputFilter DEFLATE
      SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
    <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript

When I call it says "137 ERR_NAME_RESOLUTION_FAILED"

What configuration must I give to make or IpAdress/mysite/ work?


I tried to change the vhost configuration by putting a instead of the * Then I also ran : nslookup and got

** server can't find NXDOMAIN 

dig and got :

; <<>> DiG 9.7.3 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 10196
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;  IN      A

;; AUTHORITY SECTION:    9588    IN      SOA 10800 3600 604800 10800

;; Query time: 0 msec
;; WHEN: Thu Dec 27 17:21:05 2012
;; MSG SIZE  rcvd: 108

after a wget I get nothing on error.log. As a matter of fact the wget I tried on the server leads to a 302 redirection to another domain than maindomain.

share|improve this question
On the Apache server can you do a: dig also a: nslookup, if they resolve, try a : wget http: // (if no wget, try a curl, or failing that: telnet 80, then enter: GET /), and have a look at the output or tail /var/log/(httpd|apache2)/error*.log – arober11 Dec 27 '12 at 15:53
nslookup says "server can't find – artragis Dec 27 '12 at 16:05
Quick fix, add an entry to the local /etc/hosts file e.g. xxxxxx.yyyyy.zzzzzz – arober11 Dec 27 '12 at 16:32 and it will be ok from my browser? – artragis Dec 27 '12 at 16:33
Possibly, if the host name wasn't resolving locally you'd likely see a browser error along the lines of: Oops! Google Chrome could not find – arober11 Dec 27 '12 at 16:43
up vote 1 down vote accepted

Reviewing your questions and comments, I notice a number of things. But first, most importantly: This is a DNS issue.

  • Check your DNS server and make sure that you have an A record setup for this particular subdomain.
  • In the comments, when it was suggested to add to your /etc/hosts file, that should have been done on the server, not on the client computer. Did you edit the /etc/hosts file on the server or on a workstation / client? If not the server, go back and fix it.
  • When you are sure that your DNS issues are resolved, if you're still having issues, then make sure you include the subdomain's vhost configuration in Apache in the SAME file as your primary domain. But when you do, make sure to put the subdomain's vhost above the primary domain's vhost container.

Good luck.

share|improve this answer
this was effectively a DNS issue. Checking with my friends, the one who registered the subname misspelled it. I accept your answer and wish you an happy new year – artragis Jan 6 '13 at 8:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.