The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HELP PLEASE!! $25 For help! <VirtualHost> cannot occur within <VirtualHost> section

Discussion in 'General Discussion' started by Mallclerks, Nov 17, 2003.

  1. Mallclerks

    Mallclerks Member

    Joined:
    Aug 3, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Nov 16 21:21:06 intellects httpd: [Sun Nov 16 21:21:06 2003] [warn] module mod_asis.c is already added, skipping
    Nov 16 21:21:06 intellects httpd: [Sun Nov 16 21:21:06 2003] [warn] NameVirtualHost 66.98.131.237:80 has no VirtualHosts
    Nov 16 21:21:06 intellects httpd:
    Nov 16 21:21:08 intellects httpd: /etc/rc3.d/S85httpd start: httpd started
    Nov 16 21:21:08 intellects rc: Starting httpd: succeeded
    Nov 17 15:39:17 intellects httpd: [Mon Nov 17 15:39:17 2003] [warn] module mod_asis.c is already added, skipping
    Nov 17 15:39:17 intellects httpd:
    Nov 17 15:39:17 intellects httpd: [Mon Nov 17 15:39:17 2003] [warn] NameVirtualHost 66.98.131.237:80 has no VirtualHosts
    Nov 17 15:39:17 intellects httpd:
    Nov 17 15:39:19 intellects httpd: /etc/rc3.d/S85httpd start: httpd started
    Nov 17 15:39:19 intellects rc: Starting httpd: succeeded
    Nov 17 21:26:38 intellects httpd: [Mon Nov 17 21:26:38 2003] [warn] module mod_asis.c is already added, skipping
    Nov 17 21:26:38 intellects httpd:
    Nov 17 21:26:39 intellects httpd: Syntax error on line 3017 of /usr/local/apache/conf/httpd.conf:
    Nov 17 21:26:39 intellects httpd: <VirtualHost> cannot occur within <VirtualHost> section
    Nov 17 21:26:39 intellects httpd: /etc/rc3.d/S85httpd start: httpd could not be started
    Nov 17 21:26:39 intellects rc: Starting httpd: failed
    httpd has failed, please contact the sysadmin.




    Anyone happen to know which line of code is missing or something. I went to delete the code shown in this thread
    http://forums.cpanel.net/showthread.php?s=&threadid=3628&highlight=uninstall+tomcat
    to uninstall tomcat but now my http wont start back up :(

    Any help would be GREATLY APPRECIATED!
     
  2. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Re: HELP PLEASE!! $25 For help! <VirtualHost> cannot occur within <VirtualHost> secti

    It measn that somewhere in your httpd.conf you have the following:

    <VirtualHost>
    ...
    <VirtualHost>
    ...
    </VirtualHost>


    In other words, you are defining a Virtual Host entry within another one, which isn't allowed - each VirtualHost entry must be opened and closed properly.
     
  3. Mallclerks

    Mallclerks Member

    Joined:
    Aug 3, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Is there away to see which line is which?

    When I log in via root using putty is doesnt show which line each is? So is there a easy way to find line 3017???
     
  4. Mallclerks

    Mallclerks Member

    Joined:
    Aug 3, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Now im getting this....



    [6]+ Stopped pico -w -z httpd.conf
    root@intellects [/usr/local/apache/conf]# /scripts/updatenow
    receiving file list ... done
    wrote 101 bytes read 7718 bytes 15638.00 bytes/sec
    total size is 2874520 speedup is 367.63
    root@intellects [/usr/local/apache/conf]# /etc/init.d/httpd stop
    /etc/init.d/httpd stop: httpd (no pid file) not running
    root@intellects [/usr/local/apache/conf]# killall -9 httpd
    httpd: no process killed
    root@intellects [/usr/local/apache/conf]# /etc/init.d/httpd start
    [Mon Nov 17 22:17:32 2003] [warn] module mod_asis.c is already added, skipping
    Syntax error on line 444 of /usr/local/apache/conf/httpd.conf:
    Invalid command '</VirtualHost></IfModule>', perhaps mis-spelled or defined by a module not included in the server configuration
    /etc/init.d/httpd start: httpd could not be started
    root@intellects [/usr/local/apache/conf]#




    If anyone would be willing to try and log in and figure this out I could send ya $25 via paypal right now! I really wanna get this fixed asap as I got things to do and really dont feel like having these problems tonight, lol!


    AIM - rockinstan
    email - stan@thrillinghill.com

    If anyone is willing to try and fix it please let me know :(
     
    #4 Mallclerks, Nov 17, 2003
    Last edited: Nov 17, 2003
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    If it just now stopped you could try to fix it by doing
    cd /usr/local/apache/conf/
    mv httpd.conf.bak httpd.conf
    cp httpd.conf httpd.conf.bak
    service httpd stop
    service httpd start
     
  6. Mallclerks

    Mallclerks Member

    Joined:
    Aug 3, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    finally fixed. Thanks to everyone who helped!
     
  7. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    how did you fix this? I am in dire need of assistance here, I am getting the

    [warn] NameVirtualHost 66.135.33.201:80 has no VirtualHosts

    message as well. Thanks in advance!
     
  8. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Search httpd.conf for 66.135.33.201:80 and make sure that each instance has the </VirtualHost> tag. Fix the one(s) that doesn't and then restart apache.
     
  9. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    I did, and they all do, it still fails.
     
  10. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Does the httpd.conf file have a line like

    NameVirtualHost 66.135.33.201:80


    before any accounts using that IP?

    And does it have accounts using that IP with

    <VirtualHost 66.135.33.201>


    before the account and with

    </VirtualHost>


    after the account?
     
  11. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    all hosts have the
    <VirtualHost 66.135.33.201></virtualhost>
    tags, none use direct IP.

    Yes, it does have a namedvirtualhost 66.135.33.201:80 tag in there, three of them.

    I left them all there, it fails. I commented them all out, it fails.

    I tried deleting them, restarting, and then looking at the file again, and they are back again, so cpanel is creating those entries there.
     
  12. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    You said "Yes, it does have a namedvirtualhost 66.135.33.201:80 tag in there, three of them.".

    Does it say "namedvirtualhost 66.135.33.201:80" or does it say "NameVirtualHost 66.135.33.201:80"?

    Notice the capitalization and no "d"?

    If the line does actually say
    NameVirtualHost 66.135.33.201:80
    then I have no idea what else the problem could be.

    It is safe to delete extra lines. I do it all the time. Just be sure to leave one there.
     
  13. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Yes, sorry, it does say
    NameVirtualHost , in my hurry I must have thought it said named. Sorry for the confusion. It does have them there.
     
Loading...

Share This Page