store | blogs | forums | twitter | facebook | wiki | downloads | support portal
Atomic Secure Linux
It is currently Fri Dec 06, 2019 5:16 pm

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Plesk test directory
Unread postPosted: Thu Nov 20, 2014 7:15 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 2321
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 :-)

_________________
--------------------------------
<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>


Top
 Profile  
Reply with quote  
 Post subject: Re: Plesk test directory
Unread postPosted: Thu Nov 20, 2014 8:10 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Aug 01, 2006 2:45 pm
Posts: 573
Location: Netherlands
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:
Code:
# 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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group