#1  
Old 27th April 2011, 21:58
BoloMarkIII BoloMarkIII is offline
Member
 
Join Date: Nov 2008
Posts: 31
Thanks: 2
Thanked 0 Times in 0 Posts
Default Apache2 no VirtualHosts

I am using Ispconfig 2 on a VM of OpenSuse 11.4 x64 setup using the "Perfect Server" setup on HowtoForge.

I am on my 3rd attempt to install so I am taking it slow one step at a time to try and figure out what is going wrong.

After installing the OS and going through the perfect server setup and installing Ispconfig 2 all seems to OK. I rebooted the server and again everthing seems to be working.

Now here is where my problem is.

I create a client (me) and then add a web site with an admin user, then upload my web files.
Open a browser goto my site and there it is my site displays no problem.

Now I reboot the server, login to the Ispconfig console (from another comp) and the "Web Server" is offline everything else is online. On the server I tried restarting ispconfig manualy with no joy. When I try and restart apache2 I get this error
Code:
server1:~ # /etc/init.d/apache2 start
Starting httpd2 (prefork) [Wed Apr 27 13:24:14 2011] [warn] NameVirtualHost 173.185.183.158:80 has no VirtualHosts
                                                                                                       failed
Here is the Vhosts_ispconfig.conf
Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 127.0.0.2:80
<VirtualHost 127.0.0.2:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
  <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
  </IfModule>
</VirtualHost>
NameVirtualHost 173.185.183.158:80
<VirtualHost 173.185.183.158:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
  <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
  </IfModule>
</VirtualHost>
NameVirtualHost 173.185.183.158:80
<VirtualHost 173.185.183.158:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
  <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
  </IfModule>
</VirtualHost>
#
#
######################################
# Vhost: www.cyber-medic.net:80
######################################
#
#
<VirtualHost 173.185.183.158:80>
ServerName www.cyber-medic.net:80
ServerAdmin webmaster@cyber-medic.net
DocumentRoot /srv/www/web1/web
ServerAlias cyber-medic.net
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
Alias  /cgi-bin/ /srv/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /srv/www/web1/log/error.log
AddHandler application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
<IfModule mod_ruby.c>
  <Directory /srv/www/web1/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>
<IfModule mod_python.c>
 <Directory /srv/www/web1/web>
   #Options +Indexes +FollowSymLinks +MultiViews
   #AllowOverride Indexes AuthConfig Limit FileInfo
   #Order allow,deny
   #allow from all
   AddHandler mod_python .py
   PythonHandler mod_python.publisher
   PythonDebug On
 </Directory>
</IfModule>
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
AddType text/vnd.wap.wml .wml
AddType text/vnd.wap.wmlscript .ws .wmlscript
AddType image/vnd.wap.wbmp .wbmp
Alias /stats "/srv/www/web1/web/webalizer"
Alias /error/ "/srv/www/web1/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 ^/~([^/]+)(/(.*))? /srv/www/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/web1/user/$1/web/$3
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
</IfModule>
<IfModule mod_dav.c>
       Alias /webdav /srv/www/web1/web
        <Location /webdav>
           DAV On
           AuthType Basic
           AuthName "webdav"
           AuthUserFile /srv/www/web1/passwd.dav
           Require valid-user
       </Location>
</IfModule>
</VirtualHost>
#
#
#
So everthing works till I do a reboot then the Apache2 web server refuses to start because of a bad virtualhost file how can I fix this.
Reply With Quote
Sponsored Links
  #2  
Old 28th April 2011, 16:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Do you have
PHP Code:
$go_info["server"]["apache2_php"] = 'addhandler'
in /home/admispconfig/ispconfig/lib/config.inc.php?
Does
Code:
httpd -t
show any syntax errors?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 28th April 2011, 18:19
BoloMarkIII BoloMarkIII is offline
Member
 
Join Date: Nov 2008
Posts: 31
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Do you have
PHP Code:
$go_info["server"]["apache2_php"] = 'addhandler'
in /home/admispconfig/ispconfig/lib/config.inc.php?
Yes

Does
Code:
httpd -t
show any syntax errors?
Here is output:
Code:
server1:~ # httpd -t
[Thu Apr 28 10:06:58 2011] [warn] NameVirtualHost 173.185.183.158:80 has no VirtualHosts
Syntax OK
I have this server in a VM and I saved a copy before I add any web sites.
When I add a site it works until a reboot or restart Ispconfig manualy then Apache2 wont start with error.
Reply With Quote
  #4  
Old 29th April 2011, 00:55
BoloMarkIII BoloMarkIII is offline
Member
 
Join Date: Nov 2008
Posts: 31
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Another follow up.
Ispconfig works properly after install and after I add the first web site.
If I reboot server or restart Ispconfig manually before I add a site it works.
If I reboot server or restart ispconfig manually after I add a site Apache web server does not start /w error.
If I add a second site while first one is still working Apache web sever goes offline and wont restart /w error.
Reply With Quote
  #5  
Old 29th April 2011, 14:03
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
 
Default

Quote:
Originally Posted by BoloMarkIII View Post
Here is output:
Code:
server1:~ # httpd -t
[Thu Apr 28 10:06:58 2011] [warn] NameVirtualHost 173.185.183.158:80 has no VirtualHosts
Syntax OK
That's just a warning and doesn't prevent Apache from working. Did you check Apache's error logs?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.1.4 causes Apache to have too many open files gkovacs Installation/Configuration 29 27th February 2013 09:59
Whole server went down wxman General 25 28th September 2012 19:32
Unneeded Apache 2 Modules lewis_saint General 10 12th April 2011 14:26
Apache2 Errors Web-Sites Won't Load giganet Installation/Configuration 4 1st January 2009 20:00
debian etch apache2 virtualhosts gabrix Server Operation 3 13th October 2007 19:54


All times are GMT +2. The time now is 11:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.