LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Virtualhost setup on apache 2 (https://www.linuxquestions.org/questions/debian-26/virtualhost-setup-on-apache-2-a-241371/)

notmatt 10-11-2004 12:13 PM

Virtualhost setup on apache 2
 
Hello

I'm using Debian - testing (3.1), as a webserver.

I'm having some problems with setting up virtualhosts under apache2. I can't seem to find any documentation (no man pages & the README isn't very helpful) to set up new virtualhosts using Debian's system for virtualhosts. Are you supposed to use the standard apache directives for setting up virtualhosts? If you are then what have I missed?

I get the following error message from apache2 when stopping and starting:

[Mon Oct 11 18:07:48 2004] [error] (EAI 2)Name or service not known: Cannot resolve host name newVhost --- ignoring!

This is the syntax in /var/apache2/sites-available/newVhost

I have created a directory /var/www/newVhost and put an index.html file in it.

Code:

NameVirtualHost newVhost
<VirtualHost newVhost>
        ServerAdmin admin@newVhost

        DocumentRoot /var/www/newVhost
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/newVhost>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # RedirectMatch ^/$ /apache2-default/
        </Directory>

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

        ErrorLog /var/log/apache2/error.log

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

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

        Alias /icons/ "/usr/share/apache2/icons/"
        <Directory "/usr/share/apache2/icons">
            Options Indexes MultiViews
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>

Anyone able help?

Thanks

Matt

notmatt 10-11-2004 12:54 PM

I am an idiot. I've managed to figure it out. The virtualhosts now work. I just now get the error:

Reloading web server config...[Mon Oct 11 18:51:18 2004] [error] (EAI 2)Name or service not known: Failed to resolve server name for 2001:ba8:1af:1000::1 (check DNS) -- or specify an explicit ServerName
done.

Which I think is just and ipv6 issue.

Sorry to have been a bother. I must stop posting to here when I get a problem. I'm usually able to solve it my self, with a bit of work.

notmatt 10-28-2004 01:05 PM

Reloading web server config...[Mon Oct 11 18:51:18 2004] [error] (EAI 2)Name or service not known: Failed to resolve server name for 2001:ba8:1af:1000::1 (check DNS) -- or specify an explicit ServerName done.

I am still getting the same error message. Anyone else ever get this message? Anyone able to help?


All times are GMT -5. The time now is 06:33 AM.