1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache will not start with vhost

Discussion in 'Web and Network Services' started by reppa, Aug 15, 2010.

  1. reppa

    reppa New Member

    Messages:
    10
    Likes Received:
    0
    Hi,

    I have some problem with enabling vhost in httpd.conf. Here is my http-vhost.conf file:

    Code:
    NameVirtualHost *:80
    
    <VirtualHost *:80>
    ServerName my.server.no
    DocumentRoot /usr/local/www/apache22/data/www
    ServerAdmin [email]xx@xx.com[/email]
    CustomLog /usr/local/www/logs/domain-access_log combined
    ErrorLog /usr/local/www/logs/domain-error_log
    </VirtualHost>
    
    <VirtualHost *:80>
    ServerName my.sever.no
    ServerAlias my.server2.no
    DocumentRoot /usr/local/www/apache22/data/www/server2
    ServerAdmin [email]xx@xx.com[/email]
    CustomLog /usr/local/www/logs/domain-access_log combined
    ErrorLog /usr/local/www/logs/domain-error_log
    </VirtualHost>
    If I put # in front of Include etc/apache22/extra/httpd-vhosts.conf and go into my.server.no everything is fine and everything goes fast. If I remove the first <VirtualHost>-tag, the my.server2.no works, but everything goes very slow. my.server.no wil not work.

    If I enable vhosts, nothing works at all. This is mye hosts file:

    Code:
    ::1                     localhost my.server.no.
    127.0.0.1               localhost my.server.no.
    77.247.144.138          my.server.no.
    127.0.0.1               localhost my.server2.no.
    77.247.144.138          localhost my.server2.no.
    
    I feel I have tried everything, but it will not work. Is there anybody that have some tips for what I'm doing wrong?

    I'm happy for all tips I get. :)

    reppa
     
  2. reppa

    reppa New Member

    Messages:
    10
    Likes Received:
    0
    The problem was wrong path to log files. Next time I will check error log earlier.:\