Top Nav

Archive | Apache

Joomla / Plesk

Here’s a vhost.conf that makes Joomla happy:

And here are the ownership/permissions:

0

Turn on register_globals on Plesk site.

Here’s a quick bit of apache config that can be placed in the conf/vhost.conf file of a Plesk site to turn on register_globals restrictions:

< Directory /var/www/vhosts/somedomain.com/httpdocs >
php_flag register_globals on
</Directory>

And then do:

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

0

Netem

Emulating wide area network delays

Add delay of 100ms:

tc qdisc add dev eth0 root netem delay 100ms

Remove delay:

tc qdisc change dev eth0 root netem delay 0ms

Change delay to 1000ms:

tc qdisc change dev eth0 root netem delay 1000ms

Add random variation to 100ms delay of +/- 10ms:

tc qdisc change dev eth0 root netem delay 100ms 10ms

Add random variation to 100ms delay of +/- 10ms with 25% correlation:

tc qdisc change dev eth0 root netem delay 100ms 10ms 25%

0

mod_jk for Plesk

Download and unpack mod_jk source package to /root/archive or other location as desired:

wget http://archive.apache.org/dist/jakarta/tomcat-4/source/\
jakarta-tomcat-connectors-4.1.27-src.tar.gz
tar -xvzf jakarta-tomcat-connectors-4.1.27-src.tar.gz
cd jakarta-tomcat-connectors-4.1.27-src/jk/native2

Prepare the configure script:

chmod 755 buildconf.sh
./buildconf.sh

Run the configure script:

./configure –with-apxs2=/usr/sbin/apxs \
–with-java-home=/usr/java/j2sdk1.4.2/
make
libtool –finish /usr/lib/httpd/modules

Copy the new modules to the apache modules directory:

cp ../build/jk2/apache2/*.so /etc/httpd/modules/

0

Pre-delegation access to FrontPage managed site with Plesk

On a server using Plesk, it is possible to setup event handlers that will create a host in the primary domain so that a client’s domain can be managed with FrontPage prior to delegation of the client’s domain name. For example, if the primary domain is “hosting.net” and the client domain is “acme.net” with an FTP user of “acme” then the “acme.hosting.net” can be created and used until “acme.net” becomes active.

Place the following script in the cgi-bin folder of the primary domain:

Now from the Plesk control panel goto Server -> Event Manager -> Add New Event Handler

In the Event field select “Physical hosting created”.

In the Command field enter:

/home/httpd/vhosts/hosting.com/cgi-bin/create-domain-handler.sh <new_domain_name> <new_system_user> <new_ip_address>

0