Mirroring a CPanel account?

Discussion in 'Installation/Configuration' started by BlueHerring, Jan 28, 2009.

  1. BlueHerring

    BlueHerring New Member

    I'd like to configure my intranet server as a mirror of CPanel hosted sites, to use as a testing and backup server. This basicly means I need my sites to have a home/username structure, with the website portion in public_html. I set up sites to include FTP access to the root of the site, so I can put scripts out of the reach of http.

    I've gotten the server configured and at least partly working, as a localhost with virtual site names. For those who are having trouble with that, the trick, after setting up the sites with "Create DNS", if you've used the Perfect Server guides to set up a DNS server, is to get the sites visible to other computers on your network. That generally means specifying explicit DNS server settings on your local network configurations, you could probably do that on your router so everyone on the internet can see your server, but I've done it on the individual machines. Rather than "Obtain DNS dynamically", I specified my router's DNS address (192.168.1.1) and then added the address of the server (192.1 68.1.15). You can also edit your hosts file if you're running windows, that is in c:\windows\system32\drivers\etc\hosts, but I had better results with configuring the network DNS.

    Anyhow, back to my question; is there any clean way to set up a site so that I've got a \home\username directory structure? I considered just doing parallel apache sites_enabled though so far that isn't panning out and I figure it would eventually conflict with ISPConfig's assumption that is is managing the apache sites. But I thought I could probably do it by creatign a user and then setting up a symbolic link from the public_html directory over to the relevant \var\www directory.

    One other question; on one test site configured by ISPConfig, I uploaded a PHP file from Dreamweaver using the ftp configured for the site, and instead of interpreting the file as PHP, it is just a vanilla file prompting me "Open/Save". But another three-line php file is working correctly. I've chmodded both to 755 and 777 with no difference. The site has PHP enabled from the control panel. Ideas where to look?

    Thanks for any advice -

    BH
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    No, the structure is fixed and can not be changed without reprogramming ispconfig.

    But if you mirror just the content inside the public_html directory, then the structure does not matter and if some of your scripts need the structure for file includes, you can simulate it by adding some symlinks.
     
  3. BlueHerring

    BlueHerring New Member

    Thanks .

    I think I've got a structure I can work by making a symlink like of the public_html to the ISPConfig web directory, like so:

    ln -s /var/www/webnn/web /home/sitename/public_html
     

Share This Page