Has anyone written a bash script that will locate and delete all the stupid "test" directories that Plesk used to set up on all domains by default?
If you have, would you be willing to share it? I don't want to re-invent the wheel and I'm not the world's greatest bash expert
Plesk test directory
Plesk test directory
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Re: Plesk test directory
Skeleton for new virtual hosts can be found at:
/usr/share/plesk-vhost/htdocs/index.html
/var/www/vhosts/.skel/0/httpdocs/index.html
Set your own templates there, I would say preferably nothing more than a plain index.html.
Default virtual host (if not set explicitly per IP) can be found at:
/var/www/vhosts/default/htdocs/
Removing existing references to port 8880 from annoying default skeleton files. This is a must if you have closed this port in the firewall and are using ASL:
/usr/share/plesk-vhost/htdocs/index.html
/var/www/vhosts/.skel/0/httpdocs/index.html
Set your own templates there, I would say preferably nothing more than a plain index.html.
Default virtual host (if not set explicitly per IP) can be found at:
/var/www/vhosts/default/htdocs/
Removing existing references to port 8880 from annoying default skeleton files. This is a must if you have closed this port in the firewall and are using ASL:
Code: Select all
# httpdocs
echo "Replacing javascript reference to port 8880 in vhost index.html pages"; echo "Number of matches on $HOSTNAME: `grep -l ":8880/javascript" /var/www/vhosts/*/httpdocs/index.html | wc -l`"; for filename in `grep -l ":8880/javascript" /var/www/vhosts/*/httpdocs/index.html`; do echo $filename; echo "Default index.html" > $filename; done
# legacy httpsdocs
echo "Replacing javascript reference to port 8880 in SSL-vhost index.html pages"; echo "Number of matches on $HOSTNAME: `grep -l ":8880/javascript" /var/www/vhosts/*/httpsdocs/index.html | wc -l`"; for filename in `grep -l ":8880/javascript" /var/www/vhosts/*/httpsdocs/index.html`; do echo $filename; echo "Default index.html" > $filename; done
# remove reference from templates
sed -i 's/8880/80/g' /var/www/vhosts/default/htdocs/index.html
sed -i 's/8880/80/g' /usr/share/plesk-vhost/htdocs/index.html
sed -i 's/8880/80/g' /var/www/vhosts/.skel/0/httpdocs/index.html
Lemonbit Internet Dedicated Server Management