Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #21  
Old 25th January 2006, 12:30
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

Will do, but I can't do it till this evening. Thanks for your help.
Reply With Quote
Sponsored Links
  #22  
Old 25th January 2006, 19:47
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

Well, I seem to have found a problem: it is something to do with the localhost directory.

Localhost is a directory, not a symlink, and I've tried renaming it to web0 and then putting a symlink called localhost, but that failed.

I've tried removing the localhost directory, but it comes back again.

The script goes through dozens of lines, then gets to

/home/www/localhost
Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 126
Reply With Quote
  #23  
Old 25th January 2006, 20:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Do you need the localhost directory? If not, remove it or move it to another directory.
__________________
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
  #24  
Old 25th January 2006, 20:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Quote:
Originally Posted by hairydog2
I've tried removing the localhost directory, but it comes back again.
I've just seen this... Can you identify the process/program/application that creates this localhost directory?
__________________
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
  #25  
Old 25th January 2006, 20:51
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

I'm pretty sure it is Apache2.

At the top of
/etc/apache2/vhosts/Vhosts_ispconfig.conf

there is an entry that says:
NameVirtualHost 80.68.93.11:80
<VirtualHost 80.68.93.11:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>

I tried remming it out with # marks, then restarting Apache, but my # marks got wiped out again.
Reply With Quote
  #26  
Old 25th January 2006, 20:58
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

It was apache2. I shut it down and then deleted the directory localhost. Then I made a directory called web0 and then did

ln -s web0 localhost

Restarted apache2 and tried running the script - and it didn't fail!

Of course, when the second (webalyzer) script runs, it throws loads of errors to do wth there being no group for web0.

Now all I need to do is to stop ispconfig putting the localhost entry into the config file

Last edited by hairydog2; 25th January 2006 at 21:01.
Reply With Quote
  #27  
Old 25th January 2006, 21:24
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

Hmm. Although webalyzer did run, it threw an error.

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 1
61


and sometimes

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 1
61


This seemed to be repeated for each website. Line 161 of that file says

if (is_dir($dir."/".$filename)) $directory_array = array_merge($directory_array, dir_array($dir."/".$filename));

I notice that one site, which is set "Options | Logsize: 40" still has a big log file. It is currently at "432M" according to ISPConfig Stats, and 440914KB according to my ftp program.

I really do need thse logs to be trimmed each day!
Reply With Quote
  #28  
Old 25th January 2006, 22:00
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,651 Times in 4,461 Posts
Default

ISPConfig is not creating a localhost directory, I've never seen this directory in any ISPConfig installation before. Did you create localhost as website or Co-Domain in ISPConfig?

To you logsize problem. If the log and webalizer script cant run until the end, the logfiles wont get trimmed.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #29  
Old 26th January 2006, 00:35
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

I'm getting nearer the answer. All the entries in the log for localhost are hacking attempts: the usual stuff, but I've now realised that the directory is being created by the log splitting script - because there are failed attempts to access "localhost" in the log.

I'm not sure how to get round this.

Workaround I'm trying as I type:

1. Create a directory called web0 containing log/2006/01
2. Create a symlink called localhost
3. Run the logs.psp script
4. Delete the step 1 and 2 objects
5. Run the webalize.php script

So far, it is working.

Last edited by hairydog2; 26th January 2006 at 00:41.
Reply With Quote
  #30  
Old 26th January 2006, 01:06
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
 
Default

No, it still failed. Lots of:

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #1 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161

Warning: array_merge(): Argument #2 is not an array in /root/ispconfig/scripts/shell/webalizer.php on line 161


errors on the console. Still no sign of the localhost directory reappearing.

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


All times are GMT +2. The time now is 03:01.


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