Current time: 04-20-2024, 01:39 PM Hello There, Guest! (LoginRegister)


Post Reply 
ispcp.conf
Author Message
kotso Offline
Junior Member
*

Posts: 15
Joined: Dec 2009
Reputation: 0
Post: #1
ispcp.conf
Hello,

I'm running ispcp with many domains, over 1000

and i have lots of probems with ispcp.conf file.

there are lots of errors in this config

generaly some parts of config is missing or is inerted in wrong place.

is there any polibility or patch to get rid of one huge conf and have virtual host configs in separate files?

when I had less users everythong was working fine but nor my config is more then 100000 lines in lenght and even when i do config regeneration i have lots of errors in file.

just for idea: config looks like if multiple insances of program was using editiong file and thay make one big mess.
12-10-2009 02:51 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: ispcp.conf
Which version of ispcp are you using?
12-10-2009 04:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kotso Offline
Junior Member
*

Posts: 15
Joined: Dec 2009
Reputation: 0
Post: #3
RE: ispcp.conf
ispcp-omega-trunk-20091207

does ispcp locks ispcp.conf while editing?
here is some additional info that may help:

server: 8 core, 2x xeon

#apachectl --configtest

httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Syntax error on line 118926 of /etc/httpd/vhosts/ispcp.conf: </Directb.ge/phptmp/:/usr/share/pear/"> directive missing closing '>'

</Directb.ge/phptmp/:/usr/share/pear/"
php_admin_value upload_tmp_dir "/var/www/virtual/grigol.myweb.ge/phptmp/"
php_admin_value session.save_path "/var/www/virtual/grigol.myweb.ge/phptmp/"
php_admin_value sendmail_path '/usr/sbin/sendmail -f vu3790 -t -i'
</IfModule>

here is block of config with bug.
(This post was last modified: 12-10-2009 04:26 PM by kotso.)
12-10-2009 04:15 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: ispcp.conf
(12-10-2009 04:15 PM)kotso Wrote:  ispcp-omega-trunk-20091207

does ispcp locks ispcp.conf while editing?

Yes. In theory, there can only be one backend operating (modifying things) at the same time, as you can see here (lock_ system implementation). Now, it seems that either "flock()" is not working properly on your system or there's another script modifying the config file, so do you have any idea about why this may happen? I only can think of a few possible reasons:

1. You're using NFS (or another non-flock-friendly) filesystem.
2. You've made a script that modifies the apache config file by itself.
3. For some reason, you call one of the manager scripts (ispcp-*-mngr) directly, without letting ispcp-rqst-mngr do its work.

Am I right on any of these? Can you provide more info on what was running when the file got corrupted?

Thanks and sorry for the inconvenience....
(This post was last modified: 12-10-2009 04:50 PM by kilburn.)
12-10-2009 04:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kotso Offline
Junior Member
*

Posts: 15
Joined: Dec 2009
Reputation: 0
Post: #5
RE: ispcp.conf
ok,

I'm not using NFS.

I don hae ny script modifing config directly.

firstly i found whis bug when creating account with http://www.isp-control.net/documentation...mmands_cli whis manual, from php.

then I tried to regenerate config http://www.isp-control.net/documentation...ate_config with this manual. (but before i truncated ispcp.conf)

and now I have bugy config again.

now I want to regenerate config.

should i do it by config regeneration manual?

aboiut not working flock - I really don't know, I run multicore x86_64.
12-10-2009 05:51 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #6
RE: ispcp.conf
(12-10-2009 05:51 PM)kotso Wrote:  firstly i found whis bug when creating account with http://www.isp-control.net/documentation...mmands_cli whis manual, from php.

Hmm... this script uses the same request procedure as the panel itself, so it should be properly locked too :S

Quote:then I tried to regenerate config http://www.isp-control.net/documentation...ate_config with this manual. (but before i truncated ispcp.conf)

and now I have bugy config again.

now I want to regenerate config.

should i do it by config regeneration manual?

The problem is that your /etc/ispcp/apache/working/ispcp.conf is already corrupted, so any regeneration on a domain-basis (such as explained in the manual) will probably fail. You have to make sure that the section startings/endings for each domain are correct, and I don't know how to do it automatically :S At the moment, my only idea would be to create a custom script to do it, and it's not a very simple task...

Quote:aboiut not working flock - I really don't know, I run multicore x86_64.
AFAIK, only the filesystem type could be responsible about flock not working properly. If you use ext{3,4} or reiserfs flock should surely work.
(This post was last modified: 12-11-2009 05:02 AM by kilburn.)
12-11-2009 05:02 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kotso Offline
Junior Member
*

Posts: 15
Joined: Dec 2009
Reputation: 0
Post: #7
RE: ispcp.conf
Ok, I can handle writing such script.

but how can I varify that everything is correct for ISPCP?

I hve allready writen scrip that parses templates from /etc/ispcp/apache and generates ispcp.conf, but I'm not sure that it is corrent for ISPCP.

(With my generated ispcp.conf apache starts and all domains are funcional) but when I changed something from admin interface ispcp.conf became corrupted again.

I will try to experiment agaiin with generating ispcp but is there any wy to varify that ispcp conf is "correct" for ispcp (I can check that its correct for apache)
and also can you say from which template the config is generated?

for my config generations I took just one virtualhost and additional data directrly from ispcp.conf

now I woul like to gererate conf just like ispcp does it.
(This post was last modified: 12-11-2009 05:06 PM by kotso.)
12-11-2009 04:58 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #8
RE: ispcp.conf
The important part are the placeholders, everything else will be automatically filled by ispcp when you regenerate the configurations. Now, there are 2 points to take into account for this idea to work:

1. You must place your generated (empty, just with the placeholders) file in /etc/ispcp/apache/working/ispcp.conf and then trigger a regeneration as explained in the manual.

2. By "empty file, just with placeholders", I mean something like this:
Code:
# httpd Data BEGIN.

#
# wget-hack prevention
#

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_USER_AGENT} ^LWP::Simple
    RewriteRule ^/.* http://%{REMOTE_ADDR}/ [L,E=nolog:1]
</IfModule>

#
# Log processing.
#

LogFormat "%B" traff
LogFormat "%v %b %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" ispcplog

CustomLog "| /var/www/ispcp/engine/ispcp-apache-logger" ispcplog
ErrorLog "| /var/www/ispcp/engine/ispcp-apache-logger -e"

#
# mod_cband configuration
#

<IfModule mod_cband.c>
    CBandScoreFlushPeriod 10
    CBandRandomPulse On
</IfModule>

#
# let the customer decide what charset he likes to use
#

AddDefaultCharset Off

#
# Header End
#

---- THIS IS A COMMENT, NOT TO APPEAR ON THE FILE:
---- (r0) Repeat this section for every IP of your server
# httpd [your.server.ip.addr] virtual host entry BEGIN.

NameVirtualHost your.server.ip.addr:80

# httpd [{DMN_GRP}] dmn group entry BEGIN.
# httpd [{DMN_GRP}] dmn group entry END.
---- THIS IS A COMMENT, NOT TO APPEAR ON THE FILE:
---- (r1) Repeat this section for every domain.com of your server
# httpd [domain.com] dmn group entry BEGIN.

# httpd [{SUB_NAME}] sub entry BEGIN.
# httpd [{SUB_NAME}] sub entry END.

---- THIS IS A COMMENT, NOT TO APPEAR ON THE FILE:
---- (r2) Repeat this section for every sub.domain.com of domain.com
# httpd [sub.domain.com] sub entry BEGIN.
# httpd [sub.domain.com] sub entry END.
---- THIS IS A COMMENT, NOT TO APPEAR ON THE FILE:
---- (r2) The block repeated for each subdomain ends here

# httpd [domain.com] dmn entry BEGIN.
# httpd [domain.com] dmn entry END.

# httpd [domain.com] dmn group entry END.

---- THIS IS A COMMENT, NOT TO APPEAR ON THE FILE:
---- (r1) The block repeated for each domain ends here

# httpd [your.server.ip.addr] virtual host entry END.
---- THIS IS A COMMENT, NOT TO APPEAR ON THE FILE:
---- (r0) The block repeated for each IP address ends here

# httpd [{IP}] virtual host entry BEGIN.
# httpd [{IP}] virtual host entry END.

# httpd Data END.
12-11-2009 05:30 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)