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.

httpd.conf issue

Discussion in 'General Discussion' started by jivkoa, Dec 26, 2007.

  1. jivkoa

    jivkoa Member

    Joined:
    Sep 24, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    We are experiencing the following problem on one of our servers. The httpd.conf file randomly is changing its virtual hosts with the following syntax error:

    ScriptAlias /cgi-bin/ /home/XXX/public_html/XXX^M/cgi-bin/

    DocumnetRoot is changed as well. Thus the whole webserver goes down due to a syntax error error message:

    Syntax error on line xxx of /usr/local/apache/conf/httpd.conf:

    The syntax error in question is this "^M". I don't know what is putting it into the httpd.conf file.

    We have updated the cpanel to the latest stable version, but the problem still persists.

    Any help will be highly appreciated.

    Regards,

    Jivko
     
  2. xprt5

    xprt5 Well-Known Member

    Joined:
    Apr 6, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Houston
    Is this occuring for one users VirtualHost or all users?

    Check the users VirtualHost templates in /var/cpanel/userdata/username
     
  3. jivkoa

    jivkoa Member

    Joined:
    Sep 24, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I've checked the httpd.conf and noticed that every time the syntax error is in a different virtual host, different line and different user. The template looks just fine.

    Thanks,

    Jivko
     
  4. xprt5

    xprt5 Well-Known Member

    Joined:
    Apr 6, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Houston
    Check the main template file in /usr/local/cpanel/src/templates/"apache1" or "apache2"/vhost.default
     
  5. jdlightsey

    jdlightsey Perl Developer III
    Staff Member

    Joined:
    Mar 6, 2007
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Houston Texas
    cPanel Access Level:
    Root Administrator
    If that doesn't get you pointed in the right direction, could you open a support ticket 'Attn: JD' so that we can get a closer look at where that windows linefeed made it into the Apache configuration system.
     
  6. jivkoa

    jivkoa Member

    Joined:
    Sep 24, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello guys,

    And thank you for your replies.

    I have found the source of the problem. The syntax error was caused by one user's vhost template as you can see below:

    root@XXX:/var/cpanel/userdata/user# cat -v sub.domain.com
    ---
    documentroot: /home/user/public_html/sub^M

    Without '-v' option nothing wrong was dispalyed. So xprt5 you were right :)

    There were a lot of user's vhost templates files with the same syntax error. And now the question is what was inserted that ? Probably the user is entered his vhosts incorrectly and why cpanel didn't check that before to add it into the template ?

    Once again, thank you guys for all your help.

    Best Regards,

    Jivko
     
  7. jivkoa

    jivkoa Member

    Joined:
    Sep 24, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Just an update.

    Every new subdomain that the user add, a new vhost template file with that syntax error is created. I've tried to add at my end a test subdomain on his domain, however everything looks good. As far as I know "^M" means "Enter" under Windows and I think that the user is added the subdomains incorrectly. So is there any way to fix this issue permanently, it is inconvenience to edit the template every time when the user add new subdomain.

    Thank you in advance!

    Jivko
     
  8. Gatorpatrick

    Gatorpatrick Registered
    PartnerNOC

    Joined:
    Jun 15, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    You should submit a ticket and let us know the outcome. We are also experiencing the linefeed issue across multiple servers.
     
Loading...

Share This Page