Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
<VirtualHost *:80>
        ServerName www.example.com
        ServerAlias example.com
        Alias /static/ /home/ubuntu/proj/proj/static/

        DocumentRoot /home/ubuntu/proj
        WSGIScriptAlias / /home/ubuntu/proj/proj/index.wsgi


        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
</VirtualHost>

Why my website work on:

http://example.com but on www.example.com not working?

share|improve this question
    
In what way is it not working ? Are there any relevant messages in your logs and in the browser? –  Iain Aug 16 '13 at 20:09
    
@Iain: If I run www.example.com in browser I have: It works! This is the default web page for this server. The web server software is running but no content has been added, yet. From http://example.com work fine. –  user2659960 Aug 16 '13 at 20:10
    
Well, either you are reaching the wrong server, or your virtual host config is messed up somehow. –  Zoredache Aug 16 '13 at 20:23
    
Check your DNS to ensure that www.example.com and example.com point to the same IP address. –  Iain Aug 16 '13 at 20:25
    
FYI. Also cross-posted on AskUbuntu: askubuntu.com/questions/333526/… –  Kevin Bowen Aug 16 '13 at 20:32

1 Answer 1

up vote 2 down vote accepted

It looks like www.example.com and example.com are not teh same machine. Check your DNS and ensure that www.example.com and example.com resolve to the same IP address.

Take appropriate action.

share|improve this answer

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.