Skip to content

Commit 5706c1b

Browse files
author
dxr
committed
Update documentation on CHROOTED_DEBIAN_5.0.txt_beta
1 parent e12a060 commit 5706c1b

File tree

1 file changed

+30
-16
lines changed

1 file changed

+30
-16
lines changed

docs/CHROOTED_DEBIAN_5.0.txt_beta

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,18 @@ chroot /var/www/html apt-get install apache2 apache2.2-common apache2-doc apache
6565

6666
chroot /var/www/html /etc/init.d/apache2 stop
6767

68-
# Is good idea to add nagios alarm for check every simbolic link is correct.
68+
chroot /var/www/html a2enmod mod_chroot
69+
chroot /var/www/html a2enmod suexec
70+
echo "ChrootDir /var/www/html" > /var/www/html/etc/apache2/conf.d/mod_chroot.conf
71+
mkdir -p /var/www/html/var/www/html
72+
sed -i -e 's#DocumentRoot /var/www/#DocumentRoot /var/www/html/#' /var/www/html/etc/apache2/sites-enabled/000-default
73+
echo "<? phpinfo(); system(\"rm -rf test; mkdir test\"); ?>">/var/www/html/var/www/html/index.php
74+
75+
# Protect apache configuration. ONLY root can read it
76+
chown root:root /etc/apache2/ && chmod 700 /etc/apache2/
77+
78+
79+
5. # Is good idea to add nagios alarm for check every simbolic link is correct.
6980
ln -s /var/www/html/etc/apache2 /etc/apache2
7081
ln -s /var/www/html/etc/suphp /etc/suphp
7182
ln -s /var/www/html/var/run/apache2 /var/run/apache2
@@ -80,23 +91,26 @@ ln -s /var/www/html/var/lock/apache2 /var/lock/apache2
8091
ln -s /var/www/html/var/lib/apache2 /var/lib/apache2
8192
ln -s /var/www/html/usr/lib/php5 /usr/lib/php5
8293

83-
a2enmod mod_chroot
84-
a2enmod suexec
85-
echo "ChrootDir /var/www/html" > /etc/apache2/conf.d/mod_chroot.conf
86-
mkdir -p /var/www/html/var/www/html
87-
sed -i -e 's#DocumentRoot /var/www/#DocumentRoot /var/www/html/#' /etc/apache2/sites-enabled/000-default
88-
echo "<? phpinfo(); system(\"rm -rf test; mkdir test\"); ?>">/var/www/html/var/www/html/index.php
94+
6, Start apache
95+
/etc/init.d/apache2 restart
8996

90-
echo "fakeroot apt-get -qq update && fakeroot apt-get dist-upgrade">/var/www/html/sbin/Update
91-
chmod +x /var/www/html/sbin/Update
92-
printf "echo \" [+] Updating Real System ...\"\napt-get -qq update && apt-get dist-upgrade\necho \" [+] Updating Chroot System ...\"\nchroot /var/www/html/ Update ">/sbin/Update
93-
chmod +x /sbin/Update
97+
7. Install ispconfig ........
9498

95-
# Protect apache configuration. ONLY root can read it
96-
chown root:root /etc/apache2/ && chmod 700 /etc/apache2/
9799

98-
5, Start apache
99-
/etc/init.d/apache2 restart
100100

101-
6. Install ispconfig ........
101+
### Migration to other server ###
102+
Really easy:
103+
104+
Do step 1.
105+
106+
And after do a simple rsync:
107+
108+
screen
109+
time rsync -a --progress root@host1:/var/www/ /var/www/
110+
111+
# Install some apache's dependencies
112+
apt-get install debootstrap libpcre3 libaprutil1 libxml2 mime-support
113+
114+
Do step 5
115+
102116

0 commit comments

Comments
 (0)