After adding "Include vhosts/Vhosts_ispconfig.conf" httpd won;t startup

Discussion in 'Installation/Configuration' started by mebusybody, Apr 17, 2006.

  1. mebusybody

    mebusybody New Member

    Hi folk
    1. After adding Include vhosts/Vhosts_ispconfig.conf at the end of httpd.conf, httpd wont startup.
    no error in /var/log/httpd/error_log


    2. I commented off everthing related to my newly added site its was eable to startup.

    3. Ucomment the entires for the newly added site, except for enteries related to errors, I was able restart http server.

    4. Accessing www.nooo.cc (the new web site )
    I have persmission deny.
    /var/log/httpd/error_log has "[Tue Apr 18 00:22:42 2006] [error] [client 192.9.200.198] (13)Permission denied: access to / denied"

    5. Executed chmod -R a+rw /home/www, restart httpd, same problem

    The /etc/httpd/vhosts/Vhosts_ispconfig.conf below.

    Any ideal what the cause ?

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.9.200.198:80
    <VirtualHost 192.9.200.198:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    NameVirtualHost 192.9.200.198:80
    <VirtualHost 192.9.200.198:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.nooo.cc:80
    ######################################
    #
    #
    <VirtualHost 192.9.200.198:80>
    ServerName www.nooo.cc:80
    ServerAdmin [email protected]
    DocumentRoot /home/www/web3/web
    #ServerAlias nooo.cc
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ScriptAlias /cgi-bin/ /home/www/web3/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    #ErrorLog /home/www/web3/log/error.log
    #Alias /error/ "/home/www/web3/web/error/"
    #ErrorDocument 400 /error/invalidSyntax.html
    #ErrorDocument 401 /error/authorizationRequired.html
    #ErrorDocument 403 /error/forbidden.html
    #ErrorDocument 404 /error/fileNotFound.html
    #ErrorDocument 405 /error/methodNotAllowed.html
    #ErrorDocument 500 /error/internalServerError.html
    #ErrorDocument 503 /error/overloaded.html
    #AliasMatch ^/~([^/]+)(/(.*))? /home/www/web3/user/$1/web/$3
    #AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web3/user/$1/web/$3
    </VirtualHost>
    #
    #
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Why did you do this? The ISPConfig installer should have done this, unless something went wrong during your installation...
    Anyway, please try the full path in your httpd.conf:
    Code:
    Include /etc/httpd/vhosts/Vhosts_ispconfig.conf
    and restart Apache.
     
  3. mebusybody

    mebusybody New Member

    Some how it was missing, tried included the fullpath. The problem now is /var/log/httpd/error_log has "[Tue Apr 18 00:22:42 2006] [error] [client 192.9.200.198] (13)Permission denied: access to / denied"

    I was your reply in thread http://www.howtoforge.com/forums/sh...age=2&highlight=(13)Permission+denied:+access post 10,
    The <Directory /home/www/*/web>... etc was not httpd.conf. I added them but still have the error.

    Any suggestion.
    thanks
     
  4. falko

    falko Super Moderator Howtoforge Staff

    It seems that your ISPConfig installation went totally wrong. You should try to make a clean install. This will save you time instead of trying to figure out what is wrong on your system.
     
  5. mebusybody

    mebusybody New Member

    Sight this is driving me nuts. I uninstall ISPConfig and apache, and re-install them again.
    Configuring virtual webserver should not be so difficult I did it manually!

    1. The /etc/httpd/conf/httpd.conf does not have "Include /etc/httpd/vhosts/Vhosts_ispconfig.conf" after creating a site.
    Code:
    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for requests without a known
    # server name.
    #
    #<VirtualHost *:80>
    #    ServerAdmin [email protected]
    #    DocumentRoot /www/docs/dummy-host.example.com
    #    ServerName dummy-host.example.com
    #    ErrorLog logs/dummy-host.example.com-error_log
    #    CustomLog logs/dummy-host.example.com-access_log common
    #</VirtualHost>
    
    2. /etc/httpd/vhosts/Vhosts_ispconfig.conf is zero byte. But /etc/httpd/vhosts/Vhosts_ispconfig.conf~ has the configuration data.
    Code:
    -rw-r--r--  1 root root 1544 Apr 19 10:49 Vhosts_ispconfig.conf~
    -rw-r--r--  1 root root    0 Apr 19 10:49 Vhosts_ispconfig.conf
    
    3. ls /home/www has the virtual webserver that is www.nooo.cc
    Code:
    drwxr-xr-x  3 root root 4096 Apr  8 16:47 httpsd
    lrwxrwxrwx  1 root root   14 Apr 14 10:30 www.it-destination.com -> /home/www/web1
    lrwxrwxrwx  1 root root   14 Apr 17 23:34 www.nooo.cc -> /home/www/web3
    drwxr-xr-x  9 root web1 4096 Apr 18 02:05 web3
    drwxr-xr-x  9 root web1 4096 Apr 19 14:48 web1
    
    Please help!! :(
     
  6. falko

    falko Super Moderator Howtoforge Staff

    This means that there is probably some module missing in your Apache.
    Please do this:
    Code:
    mv /etc/httpd/vhosts/Vhosts_ispconfig.conf~ /etc/httpd/vhosts/Vhosts_ispconfig.conf
    httpd -t
    What's the output?
     
  7. mebusybody

    mebusybody New Member

    nothing, no output
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Is the file /etc/httpd/vhosts/Vhosts_ispconfig.conf empty?

    If yes, do you have copies of this file with a date appended to the name that are not empty?
     
  9. mebusybody

    mebusybody New Member

    No, is NOT empty now. I did "mv /etc/httpd/vhosts/Vhosts_ispconfig.conf~ /etc/httpd/vhosts/Vhosts_ispconfig.c"

    and httpd -t has no output
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Maybe you should really consider a clean reinstall.
     
  11. antun

    antun New Member

    I've done a little comparing between the files in vhosts:

    diff Vhosts_ispconfig.conf Vhosts_ispconfig.conf_30-06-08_10-27-34
    ... gives a bunch of small minor differences, and then this:

    > <IfModule mod_ruby.c>
    > <Directory /var/www/web9/web>
    > Options +ExecCGI
    > </Directory>
    > RubyRequire apache/ruby-run
    > #RubySafeLevel 0
    > <Files *.rb>
    > SetHandler ruby-object
    > RubyHandler Apache::RubyRun.instance
    > </Files>
    > <Files *.rbx>
    > SetHandler ruby-object
    > RubyHandler Apache::RubyRun.instance
    > </Files>
    > </IfModule>

    (i.e. if Vhosts_ispconfig.conf does not contain the above references to Ruby).

    Is it safe to directly edit the Vhosts_ispconfig.conf file? Is there a preferred way to put changes in there?

    Thanks,

    Antun
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Rename Vhosts_ispconfig.conf to Vhosts_ispconfig.conf.bak
    2) Rename Vhosts_ispconfig.conf_30-06-08_10-27-34 to Vhosts_ispconfig.conf
    3) Run:

    httpd -t

    and you get the error message from apache. This error is the reason that ISPConfig was not able to write the file.
     
  13. antun

    antun New Member

    Hey Till,

    I ran the http -t command like you said (thanks for the pointer, by the way) and it gave the following error:

    Syntax error on line 323 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    AllowOverride not allowed here

    There was an AllowOverride All on line 323. I removed it, ran httpd -t again, then got a Syntax OK message.

    What's the right next step here - should I reinstall ISPConfig, leaving the current vhost file in place, or can I just edit that vhost file?

    BTW, how would the AllowOverride All get into that file - is it possible that it was added there because I added it to the Apache Directives section of the particular site in ISPConfig?

    Thanks,

    Antun
     
  14. falko

    falko Super Moderator Howtoforge Staff

    Yes. Please remove it/comment it out. You don't need to reinstall ISPConfig, it would not have any effect.
     
  15. antun

    antun New Member

    Thanks. For posterity, here's what I did:

    1. Left the Vhosts_ispconfig.conf file (with offending AllowOverride All) in place.
    2. Opened the ISPConfig admin panel (https://www.example.com:81/), and removed the AllowOverride All from the Apache Options there.
    3. That act updated the Vhosts_ispconfig file.

    I didn't need to restart Apache manually or anything!

    -Antun
     

Share This Page