Current time: 12-25-2024, 03:07 PM Hello There, Guest! (LoginRegister)


Thread Closed 
domain_default_page and invisible files
Author Message
berghonk Offline


Posts: 1
Joined: Jun 2010
Reputation: 0
Post: #1
domain_default_page and invisible files
I installed my first webserver with ISPCP a few weeks ago and wanted to add some contents to the "domain_default_page" folder, but those items I added were not copied by the domain creation script.

I added the following things:

.autoconfig (folder)
|_ config.php (file)

Did I just find a bug or is that normal behavior? is it because the .autoconfig folder is invisible?

Best regards
Christian.
Should've read the source code first!

Solution: ISPCP doesn't copy the whole domain_default_page folder. It first picks the index.html and does some find/replace (so that the right domain name is shown). Afterwards it just copies the "images" folder and the index.html file to the newly created htdocs.

Why that is, I don't know...

I solved the problem as follows:

I added the following lines to the file /var/www/ispcp/engine/ispcp-dmn-mngr:
Code:
$rs = sys_command(
                        "$main::cfg{'CMD_CP'} -Rp $root_dir/gui/domain_default_page/.autoconfig ".
                        "$www_dir/$dmn_name/htdocs/");
                return $rs if ($rs != 0);

                $rs = setfmode(
                        "$www_dir/$dmn_name/htdocs/.autoconfig",
                        $sys_user,
                        $sys_group,
                        0755
                );
                return $rs if ($rs != 0);

                $rs = setfmode(
                        "$www_dir/$dmn_name/htdocs/.autoconfig/config.php",
                        $sys_user,
                        $sys_group,
                        0755
                );
                return $rs if ($rs != 0);
I added this somewhere around line 2000 of that script.

Now the script copies my .autoconfig stuff - which enables (combined with some mod_rewrite magic in the Apache config) "Thunderbird" to find email settings for all of my customers on it's own.

You can close this thread. Thanks![/code]
(This post was last modified: 12-22-2010 10:26 PM by berghonk.)
12-22-2010 09:37 PM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: domain_default_page and invisible files
I also stumbled over this some time ago... :-)

[close]
12-23-2010 06:47 PM
Visit this user's website Find all posts by this user
Thread Closed 


Forum Jump:


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