« PHPList Install to RackSpace Cloud Server (CentOS)Upgrade CentOS4 to PHP 5.2.9 with SQLite »

Additional FTP Account In Plesk

10/20/09

Permalink 11:57:22 am, by admin Email , 242 words   English (US)
Categories: Apache

Additional FTP Account In Plesk

Sometimes on a website you want to have a folder inside the document root that has it's own FTP account. For example you might have a /news folder and you want your ad agency to be able to post articles to this folder but not access the rest of the website.

Unfortunately plesk does not provide facilities for having multiple FTP accounts on a single site under the document root. Here's a work around:

1. In Plesk, create a "Web User" in the desired domain. The web user will have a document root at:

/var/www/vhosts/domain.com/web_users/[username]

And the corresponding url will be:

http://domain.com/~[username]

Where username is the name that you assigned to the web user in Plesk. This is now your FTP account. Give the login to whoever needs it and let them upload content.

2. Next we'll use a rewrite rule to map the web user's document root into a folder of the main website as follows:

a. Edit (or create) /var/www/vhosts/domain.com/conf/vhost.conf

b. Add these lines to the file:

RewriteEngine On
RewriteRule /[targetfolder](.*) /~[username]$1

where [targetfolder] is name that you wise to map [username] into.

c. Finally run:

/usr/local/psa/admin/sbin/websrvmng -a -v

and:

/sbin/service httpd reload

to make the apache changes take effect.

Now when you goto:

http://domain.com/[targetfolder]

you'll see the content in the [username] web user's home directory.

1 comment

Comment from: Jon [Visitor] · http://thewaterproofcamera.com
*****
great tip. I like it how people find ways around system that have been placed for a while.

I don't use Plesk and instead have domains with CPanel. Cpanel makes it extremely easy doing this.

But like you article with the Rewrites. It just gave me an idea. Thank!

Jon
01/14/10 @ 10:02

This post has 10 feedbacks awaiting moderation...

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
July 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution free blog software