Possible to change website ID?

Discussion in 'Installation/Configuration' started by VinceDee, Feb 26, 2008.

  1. VinceDee

    VinceDee New Member

    Is it possible to change the web[WEBID] of a site from within ISPConfig without having to resort to manually editing conf files?

    ie, web15_example.com could be changed to web6_example.com

    Also, is it possible to renumber a newer WEBID to a previously used number? I deleted several of the first websites I made, now I'd like to change the WEBID numbers of some newer sites to those earlier numbers. (and if you must know why, it's because I have an older Drupal website from an older ispconfig server that has many references to /var/www/web6 and I'd like to be able to just upload the site back into a web6 directory, rather than find and change all those pointers)

    Thanks,

    Vince
     
  2. VinceDee

    VinceDee New Member

    I went ahead and took the plunge anyway and tried to do it myself, manually. What I did:

    Rename the /var/www/web15 directory to /var/www/web6.

    rm the www.example.com symlink in the /var/www directory (it's broken now that the web15 directory no longer exists). Recreate the same symlink in the /var/www directory using ln -s to point to the new /var/www/web6 directory.

    Rename the /var/www/web6/user/web15_www.example.com directory to /var/www/web6/user/web6_www.example.com

    Renaming the directory also broke the /var/www/web15/Maildir symlink. Delete the Maildir symlink and recreate it using ln -s in the /var/www/web6 directory, pointing it to /var/www/web6/user/web15_www.example.com/

    Edit /etc/apache2/vhosts/Vhosts_ispconfig.conf file and change all references for the old /var/www/web15 directory to /var/www/web6 in the virtual host config for the specific virtual host I wanted to change (www.example.com).

    Restart apache2: /etc/init.d/apache2 restart

    The website appears to be working the same as it was before all the renaming (though it was mostly broken already because it needs php4 and not php5 to run properly, but that's another issue).

    Being a relative newb, I have very little idea of whether anything I did was the right thing, but it seems to have worked. The site still shows up in ISPConfig, too. CAUTION: DON'T ATTEMPT TO DO THIS UNLESS SOMEONE WHO KNOWS BETTER CHIMES IN AND SAYS THAT WHAT I DID WAS OKAY. No telling what I screwed up on my test server messing around with it like this. :eek:

    Vince
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    What you did is definately not recommended and you will most liekly get problems in future!

    Did you change all references in the ISPConfig database too? Did you change all ownerships? Did you change the mail configuration?
     

Share This Page