Plesk and WebDav

Need to get WebDav running on a directory within a domain hosted on Plesk 8.4 for Linux (Fedora 8).

These URLs were helpful:

Created the following files: /var/www/vhost/domain.com/conf/vhost.conf and /var/www/vhost/domain.com/conf/vhost_ssl.conf

And populated them with:

# vhost.conf
Alias /webdav_directory /var/www/vhosts/domain.com/httpdocs/webdav_directory
<Location /managementdocs>
DAV On
Options +Indexes
</Location>

And…

# vhost_ssl.conf
Alias /webdav_directory /var/www/vhosts/domain.com/httpdocs/webdav_directory
<Location /managementdocs>
DAV On
SSLRequireSSL
Options +Indexes
</Location>

Obviously you don’t need both as you may just want it accessible via HTTPs.

Then, rebuilt the Plesk webserver configuration file with the following command:  /usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=domain.com

This appeared to work and allowed adding the URL via windows “Add new network place”.

Other commands we issued (allowing read/write from the apache/psacln user – could possibly do this with chmod 2775?):

 chmod 777 /var/www/vhosts/domain.com/httpdocs/webdav_directory

Also, you probably don’t want it accessible from anyone and everyone.  You can add password authentication via the Plesk interface using protected directories.

PHP 4 apache module, Fedora 8 and Plesk 9

Some sites still require PHP 4 and for some reason do not work with PHP 5 and may not have the time to upgrade the scripts.

Useful links:

Download the latest PHP 4 source code from PHP.NET.

  • Make the directory: mkdir -p /opt/php-4.4.9
  • wget http://uk.php.net/get/php-4.4.9.tar.gz/from/this/mirror
  • tar -zxvf php-4.4.9.tar.gz
  • mv php-4.4.9 source
  • The configure statement used in this case was:
    ./configure –prefix=/opt/php-4.4.9/ –enable-versioning –with-layout=GNU –enable-libxml –with-libxml-dir=/usr/ –enable-reflection –enable-fastcgi –with-apxs2=/usr/sbin/apxs –with-regex=php –with-zend-vm=CALL –with-mysql=/usr –with-imap –enable-ftp –with-gd=/usr –with-pcre-regex=/usr –with-kerberos –with-imap-ssl –enable-memory-limit=yes –with-pear –with-zlib –enable-calendar –with-expat –with-png-dir=/usr –with-jpeg-dir=/usr –with-zlib-dir=/usr –with-freetype-dir=/usr –enable-sysvsem –enable-sysvshm –enable-exif –with-curl –enable-mbstring –enable-zend-multibyte –with-tiff-dir=/usr –with-gettext –enable-xml –with-ssl –with-mcrypt=../libmcrypt –with-mhash=../libmhash
  • If there were no problems: make && make install
  • Then, comment out the following line in: /etc/httpd/conf/httpd.conf
    #LoadModule php4_module        /usr/lib/httpd/modules/libphp4.so
  • In /etc/httpd/conf.d/php.conf comment out the PHP5 module and enable the PHP4 module:
    ##LoadModule php5_module modules/libphp5.so
    LoadModule php4_module        /usr/lib/httpd/modules/libphp4.so
  • The restart apache and check the websites: service httpd restart

This allows PHP4 to be ran as a module, however, if you want to use PHP5 you can use it via CGI in the Plesk 9 domain setting.