Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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'm having trouble setting up Apache Server. I haven't turned anything off from the default install and I'm trying to enable the functionality for "Virtual Hosts." I would like Apache Server, which is hosted on EC2 (12.04 Server), to serve my site when people visit. My DNS provider is godaddy and I've forwarded my site from godaddy to my EC2 address. Problem is that no matter what I do, the default "It works!" page is always served. I can't figure it out. This is the top of my ports.conf file:

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443

<IfModule mod_gnutls.c>
    Listen 443

My site is specified in sites-available file and there is a symbolic link visible to my site's directory in sites-enabled.

This is in the sites-available file for my site:

<VirtualHost *:80>

        ServerAlias *

        DocumentRoot /var/www/somesite
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        <Directory /var/www/somesite>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

Any suggestions? Any further information needed? I've spend HOURS on this and have gotten no where. I seem to be doing everything the tutorials say to do. I have NOT disabled the default but have read that it's good to keep that up? Thanks.

share|improve this question

Man. I feel dumb about how long this took me to fix. Clearly I know nothing about administration...

Problem was that I set up my forwarding through GoDaddy to my server, but that's it. I expected my server to know it was coming from somehow, but I wasn't passing it in the request. The request was just /. The answer was to change my forwarding from: (where the first part of that ip I just made up...)


Now when it hits the server the request is mySite/home.html and it is recognized. Thank you trial and error!

share|improve this answer

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.