Results 1 to 3 of 3

Thread: NameVirtualHost *:80 has no VirtualHosts

  1. #1
    Join Date
    Feb 2012

    NameVirtualHost *:80 has no VirtualHosts

    I recently purchased Kyle Rankin's The Official ubuntu Server Book and am trying to install a wordpress site by following the directions he provides.

    I'm using 10.4 on Amazon AWS.
    As sudo I:
    install and update the server.
    install LAMP via tasksel
    apt-get install wordpress
    create configuration file in /etc/apache2/sites-available-wordpress with the following configuration:

    NameVirtualHost *:80

    <VirtualHost *:80>
    UseCanonicalName Off
    VirtualDocumentRoot /var/www/%0
    Options All

    a2ensite wordpress
    a2dissite default
    a2enmod vhost_alias
    sudo ln -s /usr/share/wordpress/ var/
    service apache2 restart

    run the script:
    bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress

    I get the following error message:

    [Tue Feb 07 21:50:28 2012] [error] (EAI 2)Name or service not known: Could not resolve host name *.80 -- ignoring!
    [Tue Feb 07 21:50:28 2012] [warn] NameVirtualHost *:80 has no VirtualHosts

    When I try in ipaddress or domain name I get:

    Not Found

    The requested URL / was not found on this server.

    I was hoping someone could offer suggestions to get wordpress running.


  2. #2
    Join Date
    May 2007
    NY's first capital
    Ubuntu 14.04 Trusty Tahr

    Re: NameVirtualHost *:80 has no VirtualHosts

    First thing to address is this seems incorrect.

    create configuration file in /etc/apache2/sites-available-wordpress with the following configuration:
    should be


    If you did create the file above like



    cat /etc/apache2/sites-available-wordpress
    If that is your file then move it to proper directory

    sudo mv /etc/apache2/sites-available-wordpress /etc/apache2/sites-available/wordpress
    Then enable the site and start apache like your original post.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  3. #3
    Join Date
    Feb 2012

    Re: NameVirtualHost *:80 has no VirtualHosts

    My apologies, I typed the wrong directory in my post, but do have the correct directory and file set up on the server. It would have been nice if this was the problem.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts