kernow

Well-Known Member
Jul 23, 2004
1,018
54
178
cPanel Access Level
Root Administrator
Nope, i still get the same errors :(
The good news is it worked fine on one of our other servers running FC4. So thanks for that :)

Code:
HttpdCleanUp 3.2


Backing up httpd.conf.......

.....
Processing httpd.conf.......

.....
File is now 1885 bytes smaller in size

There were 2625 lines removed

Done... Restarting Apache.......

/etc/rc.d/init.d/httpd start: httpd started

All done... You should make sure all is well.......

Backup file is /usr/local/apache/conf/httpd.conf.Sep30
:cool: :cool:
 

WireNine

Well-Known Member
Aug 14, 2006
207
4
168
cPanel Access Level
Root Administrator
I thought this thread had been removed. There were reports that the script deleted bash from server causing major problems. It worked great for me. Don't know...
Could you reupload the latest version?
 

beehave

Well-Known Member
Jun 26, 2005
104
0
166
HttpCleanUp 5.0 now available!

http://www.systemabuse.com/scripts/httpdcleanup.txt

This is as safe as it gets. Be sure to set all variables correctly. Again, I have tested this and it works great.

DO NOT RUN FROM ROOT DIRECTORY!!! This script MUST be placed in it's own folder!!!

USE AT YOUR OWN RISK!!!

Please let me know how it works for you...

Thanks!
 

rpmws

Well-Known Member
Aug 14, 2001
1,822
9
318
back woods of NC, USA
great idea ..however ..running it wrecked my apache!!

HttpdCleanUp 5.0


Backing up httpd.conf.....

Processing httpd.conf.....
sed: -e expression #1, char 6: Extra characters after command
sed: -e expression #1, char 6: Extra characters after command
sed: -e expression #1, char 6: Extra characters after command
sed: -e expression #1, char 6: Extra characters after command
sed: -e expression #1, char 6: Extra characters after command
sed: -e expression #1, char 6: Extra characters after command
sed: -e expression #1, char 6: Extra characters after command
sed: -e expression #1, char 6: Extra characters after command
sed: invalid option -- i
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

-n, --quiet, --silent
suppress automatic printing of pattern space
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--help display this help and exit
-V, --version output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

E-mail bug reports to: [email protected] .
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
sed: -e expression #1, char 14: Extra characters after command

No cleanup needed at this time...

Restarting Apache just because I touched it.......

/etc/rc.d/init.d/httpd start: httpd started

All done... You should make sure all is well.......

Backup file is /usr/local/apache/conf/httpd.conf.Oct26
 

rpmws

Well-Known Member
Aug 14, 2001
1,822
9
318
back woods of NC, USA
I will look into while some servers have an issue with sed and others do not. What type of server is this?

old RH7.3 junk box with a conf file that looks like a wire monster from hell!!! ..all my other boxes worked fine
 

lloyd_tennison

Well-Known Member
Mar 12, 2004
698
1
168
Suggestion, have it do a configtest at the end before it restarts apache. That way if the test bombs, you can have it not restart and restore the old, or something like that.

Since you are sorting anyway - how about an alphabetical sort of the domains, too.
 

ManXP

Well-Known Member
Feb 3, 2005
62
0
156
I get error "Main IP not found. Please set the ip variable in the script" when running latest version on my server. IP variable is set right. Any ideas?
 

beehave

Well-Known Member
Jun 26, 2005
104
0
166
I get error "Main IP not found. Please set the ip variable in the script" when running latest version on my server. IP variable is set right. Any ideas?
It is checking your httpd.conf file to make sure the ip you entered is correct. It is not finding that ip in the httpd.conf file. You are entering the server's ip, correct?

It could also be that you have one of the other variables set incurrectly.
 
Last edited: