httpd/named won't start, VirtualHost error.

rajonbh

Registered
Dec 13, 2008
1
0
51
Stockaryd, Sweden
I'm fairly new to server management and just recently got my first dedicated server with whm/cpanel.

I was trying to restart the httpd-service and got the following error:
httpd: [ != HTTP/1..]
httpd has failed, please contact the sysadmin.
So in SSH I ran service start httpd and got the following:
[error] VirtualHost 91.205.62.130:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
httpd not running, trying to start
I've googled like crazy but not really found anything working or useful(readable).
Have attached the VirtualHost-section of httpd.conf:
Code:
# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost *

# Default vhost for unbound IPs

<VirtualHost *>
    ServerName rajonbh.domain.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.

# SSL
<IfDefine SSL>
</IfDefine>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost 91.205.62.130:80

<VirtualHost 91.205.62.130:80>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /home/username/public_html
    ServerAdmin [email protected]
    ## User username # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup username username
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup username username
    </IfModule>
    CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/domain.com combined
    ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/
</VirtualHost>
Include "/usr/local/apache/conf/includes/post_virtualhost_global.conf"
Include "/usr/local/apache/conf/includes/post_virtualhost_2.conf"

<VirtualHost 91.205.62.130>
ServerName rajonbh.domain.com
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
Would be grateful for help.
 

karlos

Member
Oct 1, 2003
17
0
151
Hello,

I have had the same problem and have seen that for some reason one of the VirtualHost didn't have the port especified, like in your last VirtualHost entry.

Code:
<VirtualHost 91.205.62.130[B][I][U]:80[/U][/I][/B]>
ServerName rajonbh.domain.com
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
Then service httpd configtest runs without error messages.

Karlos