On an Ubuntu test server, I have several sites set up. When I tried to delete one site, it deleted everything under /var/www. I can consistently reproduce this. I go to the Sites section of the ispconfig control panel and click the delete button for one site, and everything disappears. Any idea what is going on?
Which exact ISPConfig version do you use? Have you altered any website paths in the ispconfig mysql database or did you set different website paths under System > Server config > web?
ISPConfig Version: 3.0.4.3 I have not altered paths in the mysql db, nor have I changed paths under System > Server Config > Web.
Please enable debugging in ispconfig and run the server.sh script as described in the faq and post the complete output that you get when you delete a site. http://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/
root@web2:/var/www# /usr/local/ispconfig/server/server.sh 17.04.2012-13:50 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock 17.04.2012-13:50 - DEBUG - Found 4 changes, starting update process. /sbin/iptables /sbin/ip6tables 17.04.2012-13:52 - DEBUG - Calling function 'delete' from plugin 'ftpuser_base_plugin' raised by event 'ftp_user_delete'. 17.04.2012-13:52 - DEBUG - Ftpuser: deleted. 17.04.2012-13:52 - DEBUG - Processed datalog_id 48 17.04.2012-13:52 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_delete'. 17.04.2012-13:52 - DEBUG - Calling function 'delete' from plugin 'apache2_plugin' raised by event 'web_domain_delete'. 17.04.2012-13:52 - DEBUG - Removing symlink: /etc/apache2/sites-enabled/100-test.com.vhost->/etc/apache2/sites-available/test.com.vhost 17.04.2012-13:52 - DEBUG - Removing vhost file: /etc/apache2/sites-available/test.com.vhost 17.04.2012-13:52 - DEBUG - Removing website: /var/www/ 17.04.2012-13:52 - DEBUG - Removing website logfile directory: /var/log/ispconfig/httpd/test.com 17.04.2012-13:52 - DEBUG - Processed datalog_id 49 17.04.2012-13:52 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_insert'. 17.04.2012-13:52 - DEBUG - Calling function 'insert' from plugin 'apache2_plugin' raised by event 'web_domain_insert'. 17.04.2012-13:52 - DEBUG - Adding the user: web6 17.04.2012-13:52 - DEBUG - Creating symlink: ln -s /var/log/ispconfig/httpd/support.groupsystems.com /var/www//log 17.04.2012-13:52 - DEBUG - Creating symlink: ln -s /var/www// /var/www 17.04.2012-13:52 - DEBUG - exec: chown -R web6:client1 /var/www//web 17.04.2012-13:52 - DEBUG - exec: chown root:root /var/www//web 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www/ 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//cgi-bin 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//log 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//ssl 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//web 17.04.2012-13:52 - DEBUG - exec: chmod 777 /var/www//tmp 17.04.2012-13:52 - DEBUG - exec: chown root:root /var/www/ 17.04.2012-13:52 - DEBUG - exec: chown web6:client1 /var/www//cgi-bin 17.04.2012-13:52 - DEBUG - exec: chown root:root /var/www//log 17.04.2012-13:52 - DEBUG - exec: chown web6:client1 /var/www//tmp 17.04.2012-13:52 - DEBUG - exec: chown web6:client1 /var/www//ssl 17.04.2012-13:52 - DEBUG - exec: chown web6:client1 /var/www//web 17.04.2012-13:52 - DEBUG - exec: chown web6:client1 /var/www//log/error.log 17.04.2012-13:52 - DEBUG - Creating fastcgi starter script directory: /var/www/php-fcgi-scripts/web6/ 17.04.2012-13:52 - DEBUG - Creating fastcgi starter script: /var/www/php-fcgi-scripts/web6/.php-fcgi-starter 17.04.2012-13:52 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/support.groupsystems.com.vhost 17.04.2012-13:52 - DEBUG - Creating symlink: /etc/apache2/sites-enabled/100-support.groupsystems.com.vhost->/etc/apache2/sites-available/support.groupsystems.com.vhost 17.04.2012-13:52 - DEBUG - Apache status is: 1 17.04.2012-13:52 - DEBUG - Calling function 'restartHttpd' from module 'web_module'. Warning: DocumentRoot [/var/www/apps] does not exist Syntax error on line 21 of /etc/apache2/sites-enabled/000-apps.vhost: Wrapper /var/www/php-fcgi-scripts/apps/.php-fcgi-starter cannot be accessed: (2)No such file or directory 17.04.2012-13:52 - DEBUG - Apache online status after restart is: 1 17.04.2012-13:52 - DEBUG - Processed datalog_id 50 17.04.2012-13:52 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_insert'. 17.04.2012-13:52 - DEBUG - Calling function 'insert' from plugin 'apache2_plugin' raised by event 'web_domain_insert'. 17.04.2012-13:52 - DEBUG - Adding the user: web7 ln: creating symbolic link `/var/www/www': File exists 17.04.2012-13:52 - DEBUG - Creating symlink: ln -s /var/www// /var/www 17.04.2012-13:52 - DEBUG - exec: chown -R web7:client1 /var/www//web 17.04.2012-13:52 - DEBUG - exec: chown root:root /var/www//web 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www/ 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//cgi-bin 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//log 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//ssl 17.04.2012-13:52 - DEBUG - exec: chmod 755 /var/www//web 17.04.2012-13:52 - DEBUG - exec: chmod 777 /var/www//tmp 17.04.2012-13:52 - DEBUG - exec: chown root:root /var/www/ 17.04.2012-13:52 - DEBUG - exec: chown web7:client1 /var/www//cgi-bin 17.04.2012-13:52 - DEBUG - exec: chown root:root /var/www//log 17.04.2012-13:52 - DEBUG - exec: chown web7:client1 /var/www//tmp 17.04.2012-13:52 - DEBUG - exec: chown web7:client1 /var/www//ssl 17.04.2012-13:52 - DEBUG - exec: chown web7:client1 /var/www//web 17.04.2012-13:52 - DEBUG - exec: chown web7:client1 /var/www//log/error.log 17.04.2012-13:52 - DEBUG - Creating fastcgi starter script directory: /var/www/php-fcgi-scripts/web7/ 17.04.2012-13:52 - DEBUG - Creating fastcgi starter script: /var/www/php-fcgi-scripts/web7/.php-fcgi-starter 17.04.2012-13:52 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/testtest.groupsystems.com.vhost 17.04.2012-13:52 - DEBUG - Creating symlink: /etc/apache2/sites-enabled/100-testtest.groupsystems.com.vhost->/etc/apache2/sites-available/testtest.groupsystems.com.vhost 17.04.2012-13:52 - DEBUG - Apache status is: 1 17.04.2012-13:52 - DEBUG - Calling function 'restartHttpd' from module 'web_module'. Warning: DocumentRoot [/var/www/apps] does not exist Syntax error on line 21 of /etc/apache2/sites-enabled/000-apps.vhost: Wrapper /var/www/php-fcgi-scripts/apps/.php-fcgi-starter cannot be accessed: (2)No such file or directory 17.04.2012-13:52 - DEBUG - Apache online status after restart is: 1 17.04.2012-13:52 - DEBUG - Processed datalog_id 51 17.04.2012-13:52 - DEBUG - Calling function 'restartHttpd' from module 'web_module'. Warning: DocumentRoot [/var/www/apps] does not exist Syntax error on line 21 of /etc/apache2/sites-enabled/000-apps.vhost: Wrapper /var/www/php-fcgi-scripts/apps/.php-fcgi-starter cannot be accessed: (2)No such file or directory 17.04.2012-13:52 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock finished.
The paths in the server config must be wrong or empty. Please login to the ispconfig mysql database with phpmyadmin, go to the server table, inside this table must be one record, edit / open that record in phpmyadmin, copy the whole content of the field "config" and post it here. You can change the domain name and ip addresses in the config before you post it, but dont change any paths.
[global] webserver=apache mailserver=postfix dnsserver=mydns [server] auto_network_configuration= ip_address=x.x.x.x netmask=255.255.255.0 gateway=192.168.0.1 hostname=web2 nameservers=192.168.0.1,192.168.0.2 loglevel=2 backup_dir=/var/backup backup_dir_ftpread= [mail] module=postfix_mysql maildir_path=/var/vmail/[domain]/[localpart] homedir_path=/var/vmail pop3_imap_daemon=courier mail_filter_syntax=maildrop mailuser_uid=5000 mailuser_gid=5000 mailuser_name=vmail mailuser_group=vmail relayhost= relayhost_user= relayhost_password= mailbox_size_limit=0 message_size_limit=0 [getmail] getmail_config_dir=/etc/getmail [web] server_type=apache website_basedir=/var/www website_path=/var/www/ website_symlinks=/var/www/ website_symlinks_rel= vhost_conf_dir=/etc/apache2/sites-available vhost_conf_enabled_dir=/etc/apache2/sites-enabled nginx_vhost_conf_dir=/etc/nginx/sites-available nginx_vhost_conf_enabled_dir=/etc/nginx/sites-enabled CA_path= CA_pass= security_level=10 set_folder_permissions_on_update=y add_web_users_to_sshusers_group=y check_apache_config=y enable_sni=y user=www-data group=www-data connect_userid_to_webid= connect_userid_to_webid_start=10000 nginx_user=www-data nginx_group=www-data php_ini_path_apache=/etc/php5/apache2/php.ini php_ini_path_cgi=/etc/php5/cgi/php.ini php_fpm_init_script=php5-fpm php_fpm_ini_path=/etc/php5/fpm/php.ini php_fpm_pool_dir=/etc/php5/fpm/pool.d php_fpm_start_port=9010 php_fpm_socket_dir=/var/lib/php5-fpm php_open_basedir=[website_path]/web:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin nginx_cgi_socket=/var/run/fcgiwrap.socket htaccess_allow_override=All apps_vhost_port=8081 apps_vhost_ip=_default_ apps_vhost_servername= awstats_conf_dir=/etc/awstats awstats_data_dir=/var/lib/awstats awstats_pl=/usr/lib/cgi-bin/awstats.pl awstats_buildstaticpages_pl=/usr/share/awstats/tools/awstats_buildstaticpages.pl [dns] bind_user=root bind_group=bind bind_zonefiles_dir=/etc/bind named_conf_path=/etc/bind/named.conf named_conf_local_path=/etc/bind/named.conf.local [fastcgi] fastcgi_starter_path=/var/www/php-fcgi-scripts/[system_user]/ fastcgi_starter_script=.php-fcgi-starter fastcgi_alias=/php/ fastcgi_phpini_path=/etc/php5/cgi/ fastcgi_children=8 fastcgi_max_requests=5000 fastcgi_bin=/usr/bin/php-cgi fastcgi_config_syntax=1 [jailkit] jailkit_chroot_home=/home/[username] jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php [vlogger] config_dir=/etc [cron] init_script=cron crontab_dir=/etc/cron.d wget=/usr/bin/wget [rescue] try_rescue=n do_not_try_rescue_httpd=n do_not_try_rescue_mysql=n do_not_try_rescue_mail=n
The source of the problem is that the paths that I mentined in #2 of this thread have been altered on your setup. The paths that you currently use instruct ispconfig to use /var/www for each website and not a sub directory, so when you delete a site, /var/www has to be deleted. To fix that, set the correct paths again under System > Server Config > Web. The paths are: Website basedir: /var/www Website path: /var/www/clients/client[client_id]/web[website_id] Wevbsite Symlinks: /var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
Ah, thank you! I took this over from an admin that is no longer here, it looks like it is set up less than optimally. The websites are deployed in /var/www/[domain], instead of where you note, and there are no sym links. Will this cause problems down the road? I mean, should I edit the configs to match what I have now, or should I move the websites where they belong, and edit the configs to match what you just gave me? Thanks again for the help, Till...
/var/www/domain.tld/ should be a symlink which ponts to a path like /var/www/clients/client1/web1/ The symlinks are just there for easier navigation on the shell, if you use /var/www/domain.tld/ as real path and not symlink, then your websites will break as soon as you change a domain name of a website.
I have edited the configs back to the default and moved the websites to the correct location on the server, creating symlinks as necessary. So everything is as it should have been from the beginning. All my websites are up and functioning properly. I have also corrected /etc/passwd, as the homedirs for the webX id's were set to /var/www. However, when I remove a website, it still deletes /var/www. [global] webserver=apache mailserver=postfix dnsserver=mydns [server] auto_network_configuration= ip_address=x.x.x.x netmask=255.255.255.0 gateway=192.168.0.1 hostname=web3 nameservers=192.168.0.1,192.168.0.2 loglevel=0 backup_dir=/var/backup backup_dir_ftpread= [mail] module=postfix_mysql maildir_path=/var/vmail/[domain]/[localpart] homedir_path=/var/vmail pop3_imap_daemon=courier mail_filter_syntax=maildrop mailuser_uid=5000 mailuser_gid=5000 mailuser_name=vmail mailuser_group=vmail relayhost= relayhost_user= relayhost_password= mailbox_size_limit=0 message_size_limit=0 [getmail] getmail_config_dir=/etc/getmail [web] server_type=apache website_basedir=/var/www website_path=/var/www/clients/client[client_id]/web[website_id] website_symlinks=/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/ website_symlinks_rel= vhost_conf_dir=/etc/apache2/sites-available vhost_conf_enabled_dir=/etc/apache2/sites-enabled nginx_vhost_conf_dir=/etc/nginx/sites-available nginx_vhost_conf_enabled_dir=/etc/nginx/sites-enabled CA_path= CA_pass= security_level=10 set_folder_permissions_on_update=y add_web_users_to_sshusers_group=y check_apache_config=y enable_sni=y user=www-data group=www-data connect_userid_to_webid= connect_userid_to_webid_start=10000 nginx_user=www-data nginx_group=www-data php_ini_path_apache=/etc/php5/apache2/php.ini php_ini_path_cgi=/etc/php5/cgi/php.ini php_fpm_init_script=php5-fpm php_fpm_ini_path=/etc/php5/fpm/php.ini php_fpm_pool_dir=/etc/php5/fpm/pool.d php_fpm_start_port=9010 php_fpm_socket_dir=/var/lib/php5-fpm php_open_basedir=[website_path]/web:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin nginx_cgi_socket=/var/run/fcgiwrap.socket htaccess_allow_override=All apps_vhost_port=8081 apps_vhost_ip=_default_ apps_vhost_servername= awstats_conf_dir=/etc/awstats awstats_data_dir=/var/lib/awstats awstats_pl=/usr/lib/cgi-bin/awstats.pl awstats_buildstaticpages_pl=/usr/share/awstats/tools/awstats_buildstaticpages.pl [dns] bind_user=root bind_group=bind bind_zonefiles_dir=/etc/bind named_conf_path=/etc/bind/named.conf named_conf_local_path=/etc/bind/named.conf.local [fastcgi] fastcgi_starter_path=/var/www/php-fcgi-scripts/[system_user]/ fastcgi_starter_script=.php-fcgi-starter fastcgi_alias=/php/ fastcgi_phpini_path=/etc/php5/cgi/ fastcgi_children=8 fastcgi_max_requests=5000 fastcgi_bin=/usr/bin/php-cgi fastcgi_config_syntax=1 [jailkit] jailkit_chroot_home=/home/[username] jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php [vlogger] config_dir=/etc [cron] init_script=cron crontab_dir=/etc/cron.d wget=/usr/bin/wget [rescue] try_rescue=n do_not_try_rescue_httpd=n do_not_try_rescue_mysql=n do_not_try_rescue_mail=n