Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I start httpd it says:

NameVirtualHost *:443 has no VirtualHosts
NameVirtualHost *:80 has no VirtualHosts

I have however configured a virtualhost as followed:

httpd.conf:

Listen 80
NameVirtualHost *:80
NameVirtualHost *:443
Include /etc/httpd/conf/sites-enabled/

There's a symbolic link in the sites-enabled directory:

900-tennisconnect.eu.vhost -> /etc/httpd/conf/sites-available/tennisconnect.eu.vhost

The error is probably here (in the tennisconnect.eu.vhost file):

# Apache did not start after modifying this vhost file.
# Please check file /etc/httpd/conf/sites-available/tennisconnect.eu.vhost.err for     syntax errors.

It says apache did not start? But when I do "service httpd status" it says the service is running

Last but not least, the tennisconnect.eu.vhost.err file:

<Directory /var/www/tennisconnect.eu>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
    DocumentRoot /var/www/tennisconnect.eu/web

    ServerName tennisconnect.eu
    ServerAlias *.tennisconnect.eu
    ServerAdmin webmaster@tennisconnect.eu

    ErrorLog /var/log/ispconfig/httpd/tennisconnect.eu/error.log

    Alias /error/ "/var/www/tennisconnect.eu/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
    </IfModule>

    <Directory /var/www/tennisconnect.eu/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web1/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
    # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcg$
    <IfModule mod_fcgid.c>
        IdleTimeout 300
        ProcessLifeTime 3600
        # MaxProcessCount 1000
        DefaultMinClassProcessCount 0
        DefaultMaxClassProcessCount 100
        IPCConnectTimeout 3
        IPCCommTimeout 360
        BusyTimeout 300
    </IfModule>
    <Directory /var/www/tennisconnect.eu/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web1/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
        AssignUserId web1 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
        # Do not execute PHP files in webdav directory
        <Directory /var/www/clients/client1/web1/webdav>
            <FilesMatch "\.ph(p3?|tml)$">
                SetHandler None
            </FilesMatch>
        </Directory>
        DavLockDB /var/www/clients/client1/web1/tmp/DavLock
        # DO NOT REMOVE THE COMMENTS!
        # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
        # WEBDAV BEGIN
        # WEBDAV END
    </IfModule>
</VirtualHost>

This is what httpd -S returns:

[Sat Aug 18 14:52:26 2012] [warn] NameVirtualHost *:443 has no VirtualHosts
[Sat Aug 18 14:52:26 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:8081         uk2be.com (/etc/httpd/conf/sites-enabled/000-apps.vhost:10)
*:8080                 is a NameVirtualHost
default server uk2be.com (/etc/httpd/conf/sites-enabled/000-ispconfig.vhost:10)
port 8080 namevhost uk2be.com (/etc/httpd/conf/sites-enabled/000-ispconfig.vhost:10)
Syntax OK

Found this is in my apache log:

BEGIN failed--compilation aborted at /usr/local/ispconfig/server/scripts/vlogger line 148.
piped log program ' /usr/local/ispconfig/server/scripts/vlogger -s access.log -t  "%Y%m%d-access.log" /var/log/ispconfig/httpd' failed unexpectedly
Can't locate Date/Format.pm in @INC (@INC contains:  /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8  /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi    /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386- linux-thread-multi /usr/lib/perl5/5.8.8) at /usr/local/ispconfig/server/scripts/vlogger line 148.

New error in apache log, the above one is solved :)

[Sat Aug 18 23:15:01 2012] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
share|improve this question
    
look at /var/log/ispconfig/httpd/tennisconnect.eu/error.log ? –  coincoin Aug 18 '12 at 10:10
    
That is an empty file –  mattyh88 Aug 18 '12 at 10:29
    
Good new, so the log directory exists. httpd -S gives any clue? –  coincoin Aug 18 '12 at 10:39
    
Updated my first post with what httpd -S returned –  mattyh88 Aug 18 '12 at 10:52
    
Is apache listening on port 443 and 80? You can figure out by typing netstat -ntlp if you are using linux –  coincoin Aug 18 '12 at 11:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.