How to migrate proxying from Apache2 to nginx

# for i in `ls /store/chroot/proxy/etc/apache2/sites-available/`; do
hostname=`echo $i |cut -d – -f 2`;
count=`echo $i |cut -d – -f 1`;
cat template.conf |sed -e “s/{hostname}/${hostname}/” > vhosts/${count}-${hostname}.conf ;
echo “include conf/vhosts/${count}-${hostname}.conf” >> vhosts.conf;
done

The only thing left is to set the servername aliases in the config files by hand.

Leave a Reply