Archive | October, 2009

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 [...]

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.

View Comments Continue Reading →

Upgrade CentOS4 to PHP 5.2.9 with SQLite

Here’s an update to this article: Upgrade CentOS4 to PHP 5.2.9 The spec file has been modified to build the php-sqlite module which is needed by Plesk Sitebuilder. Here’s the new package: php-5.2.9_for_centos4.2.tar.gz Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments [...]

Here’s an update to this article:

Upgrade CentOS4 to PHP 5.2.9

The spec file has been modified to build the php-sqlite module which is needed by Plesk Sitebuilder. Here’s the new package:

php-5.2.9_for_centos4.2.tar.gz

View Comments Continue Reading →

Upgrade CentOS4 to PHP 5.2.9

To facilitate upgrading CentOS 4 servers to PHP 5.2.9 we created a new source RPM. This work was based on previous RPMs by Jason at Utter Ramblings (http://www.jasonlitka.com). Here’s a tar/gz with all the source and binary RPMS: http://blogs.reliablepenguin.com/files/php-5.2.9_for_centos4.tar.gz Contained in the package are the following files: freetds-0.64-1.el4.rf.i386.rpm freetds-devel-0.64-1.el4.rf.i386.rpm libmcrypt-2.5.7-1.2.el4.rf.i386.rpm libmcrypt-devel-2.5.7-1.2.el4.rf.i386.rpm libtidy-0.99.0-12.20070228.jason.1.i386.rpm libtidy-devel-0.99.0-12.20070228.jason.1.i386.rpm pcre-6.6-1.1.i386.rpm pcre-devel-6.6-1.1.i386.rpm [...]

To facilitate upgrading CentOS 4 servers to PHP 5.2.9 we created a new source RPM. This work was based on previous RPMs by Jason at Utter Ramblings (http://www.jasonlitka.com).

Here’s a tar/gz with all the source and binary RPMS:

http://blogs.reliablepenguin.com/files/php-5.2.9_for_centos4.tar.gz

Contained in the package are the following files:

freetds-0.64-1.el4.rf.i386.rpm
freetds-devel-0.64-1.el4.rf.i386.rpm
libmcrypt-2.5.7-1.2.el4.rf.i386.rpm
libmcrypt-devel-2.5.7-1.2.el4.rf.i386.rpm
libtidy-0.99.0-12.20070228.jason.1.i386.rpm
libtidy-devel-0.99.0-12.20070228.jason.1.i386.rpm
pcre-6.6-1.1.i386.rpm
pcre-devel-6.6-1.1.i386.rpm
php-5.2.5-jason.2.src.rpm
php-5.2.9-rp.1.i386.rpm
php-5.2.9-rp.1.src.rpm
php-5.2.9.tar.gz
php-bcmath-5.2.9-rp.1.i386.rpm
php-cli-5.2.9-rp.1.i386.rpm
php-common-5.2.9-rp.1.i386.rpm
php-dba-5.2.9-rp.1.i386.rpm
php-devel-5.2.9-rp.1.i386.rpm
php-embedded-5.2.9-rp.1.i386.rpm
php-gd-5.2.9-rp.1.i386.rpm
php-imap-5.2.9-rp.1.i386.rpm
php-ldap-5.2.9-rp.1.i386.rpm
php-mbstring-5.2.9-rp.1.i386.rpm
php-mcrypt-5.2.9-rp.1.i386.rpm
php-mhash-5.2.9-rp.1.i386.rpm
php-mssql-5.2.9-rp.1.i386.rpm
php-mysql-5.2.9-rp.1.i386.rpm
php-ncurses-5.2.9-rp.1.i386.rpm
php-odbc-5.2.9-rp.1.i386.rpm
php-pdo-5.2.9-rp.1.i386.rpm
php-pgsql-5.2.9-rp.1.i386.rpm
php-snmp-5.2.9-rp.1.i386.rpm
php-soap-5.2.9-rp.1.i386.rpm
php-tidy-5.2.9-rp.1.i386.rpm
php-xml-5.2.9-rp.1.i386.rpm
php-xmlrpc-5.2.9-rp.1.i386.rpm

If you want to build install the binary distribution just do this:

rpm -Uvh freetds-0.64-1.el4.rf.i386.rpm \
    libmcrypt-2.5.7-1.2.el4.rf.i386.rpm \
    libtidy-0.99.0-12.20070228.jason.1.i386.rpm \
    pcre-6.6-1.1.i386.rpm php-*.i386.rpm

or you can rebuild the source rpm as follows:

rpm -i reetds-* libmcrypt-* \
    libtidy-* pcre-* \
    php-5.2.9-rp.1.src.rpm
rpmbuild -ba /usr/src/redhat/SPEC/php.spec

If you’ve not previously done so, you might need to install the rpm-build package in order to use the rpmbuild command. Also there will probably be some other dependencies that you have to install with yum to get the build to run.

After the build completes, just install the new binary packages:

rpm -i /usr/src/redhat/RPMS/i386/php-*.rpm
View Comments Continue Reading →