Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am not exactly sure what I am doing wrong. I have been able to get subdomains to work on my server, running Ubuntu 10.04 Server. I am running like a Ubuntu recommends with the VirtualHost information in the sites-available/ folder. It was confusing at first how it worked, but after playing with it for over 8 hours things are making more sense.

My biggest problem I feel is I am missing something basic. I just don't know what it is. Here are my virtual host files.

sites-available/net.percent20.net

<VirtualHost *:80>
    ServerName net.percent20.net
    DocumentRoot /srv/www/net.percent20.net/public_html/

    MonoServerPath net.percent20.net "/usr/bin/mod-mono-server2"
    MonoDebug net.percent20.net true
    MonoSetEnv net.percent20.net MONO_IOMAP=all
    MonoApplications net.percent20.net "/:/srv/www/net.percent20.net/public_html"
    <Location "/">
            Allow from all
            Order allow,deny
            MonoSetServerAlias net.percent20.net
            SetHandler mono
            SetOutputFilter DEFLATE
            SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
    </Location>
    <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
    </IfModule>
</VirtualHost>

sites-available/percent20.net

<VirtualHost *:80>
    ServerName percent20.net
    ServerAlias www.percent20.net
    DocumentRoot /srv/www/percent20.net/public_html
</VirtualHost>

sites-available/languagesamurai

<VirtualHost *:80>
    ServerName languagesamurai.com
    ServerAlias www.languagesamurai.com
    DocumentRoot /srv/www/languagesamurai/
</VirtualHost>

The current problem I come up against is if I am trying to add a domain that isn't a subdomain it shows what is should be on net.percent20.net. However, net.percent20.net works too.

This is a real confusing problem and lack of knowledge about Apache on my part is a real hamper.

Any ideas would be greatly appreciated. If more information is needed I can provide that too.

share|improve this question
1  
Have you enabled the second site? sudo a2ensite languagesamurai –  LukeR Sep 26 '10 at 23:56
    
Thanks I forgot to activate the site. Wow I feel dumb. –  percent20 Sep 27 '10 at 0:08
    
@LukeR use answer section so that percent20 can accept it –  alexus Dec 5 at 20:55

1 Answer 1

I forgot to activate the site with:

sudo a2ensite languagesamurai 
share|improve this answer
    
this should not be an answer, or should contain more then that... –  alexus Dec 5 at 20:56

Your Answer

 
discard

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.