Virtual hosting set up problem
Eero Volotinen
eero.volotinen at iki.fi
Tue Jul 26 06:26:14 UTC 2011
2011/7/26 Amrit Pal Pathak <amritpalpathak1 at gmail.com>:
> I have struggle to do virtual hosting from many days.Till now what i did as
> follow.
>
> 1)At the end of the /etc/apache2/apache2.conf file i added the following
> line:
>
> NameVirtualHost ip.address:port
>
> 2) in /sites-available directory i created a file with name "
> ubuntu-tutorials.com" with having the following contents.
>
> <VirtualHost 1.2.3.4:80>
> ServerName ubuntu-tutorials.com
> ServerAlias www.ubuntu-tutorials.com
> ServerAdmin christer.edwards at ubuntu.com
> DocumentRoot /var/www/ubuntu-tutorials.com
> </VirtualHost>
>
>
> 3) in /var/www i made a file with name "ubuntu-tutorials.com" and just
> simply added a hello word to it.
>
> 4) Now i restarted the apache and it gave me the following message.
>
> * Restarting web server
> apache2 [Tue Jul 26 01:53:37
> 2011] [error] (EAI 5)No address associated with hostname: Could not resolve
> host name dev.example.com -- ignoring!
> Warning: DocumentRoot [/home/myuser/public_html/example.com] does not exist
> Warning: DocumentRoot [/var/www/ubuntu-tutorials.com/html] does not exist
> [Tue Jul 26 01:53:37 2011] [error] (EAI 5)No address associated with
> hostname: Could not resolve host name ip.address:port -- ignoring!
> ... waiting [Tue Jul 26 01:53:38 2011] [error] (EAI 5)No address associated
> with hostname: Could not resolve host name dev.example.com -- ignoring!
> Warning: DocumentRoot [/home/myuser/public_html/example.com] does not exist
> Warning: DocumentRoot [/var/www/ubuntu-tutorials.com/html] does not exist
> [Tue Jul 26 01:53:39 2011] [error] (EAI 5)No address associated with
> hostname: Could not resolve host name ip.address:port -- ignoring!
Read docs at http://httpd.apache.org/docs/2.2/vhosts/examples.html.
you also need working dns and document root must also exists.
--
Eero
More information about the ubuntu-users
mailing list