Tuesday, July 25, 2006

Plesk and open_basedir

I'm using Plesk as a virtual server solution and have had some quesitons about accessing files outwith the vhosts home httpdocs directory.

This is not possible as default using Plesk. You need to override the open_basedir restriction by placing a file called vhost.conf in the /var/www/vhosts/**domain.com**/conf / directory.
php_admin_value open_basedir "/var/www/vhosts/**domain**/httpdocs:/tmp:***directory/***"
Save it and then restart the appropriate services with:
sudo /opt/psa/admin/sbin/websrvmng -v -a
You also need to ensure that the domain has PHP safe mode switched off:
Menu -> Domains -> domain.com -> Setup
uncheck the safe mode box (near the bottom of the page)
This will create configuration files for all domains and restart the appropraite services.

Friday, July 07, 2006

Hosting solution

I have been looking around for an appropriate hosting solution to use. I want to set up a server to allow clients to host domains. There are several examples of opensource and commercial software that offer such a facility. I tried a couple and decided that above all, stability was paramount. A close second came security and thirdly and very importantly, ease of use and customer satisfaction.

It boiled down to two solutions, cPanel (which I have used before) and Plesk. And... I decided on the latter. I'm afraid to say that I don't really have any evidence related to which is better - I think I just preferred the examples and demonstration implementations of Plesk.

Sunday, July 02, 2006

SSH tunnel

I needed to connect to a remote Postgres server and the serveradmin was appropriately reluctant to open up post 5432.

Simple solution was to create an ssh tunnel. I'm running a Postgres server locally, so I didn't want to forward port 5432 to the remote machine.
ssh -L5431:localhost:5432 server.with.the.postgres.db

Postgres 7.4

Another small fix for the installation of Postgres 7.4 on Ubuntu Dapper.

After installation and setting up users and a default database, psql got me into the terminal, but I couldn't connect from PgAdminIII.

I tried to connect to the localhost with:
psql -h localhost
This failed, because as default, the TCP/IP socket is set to false. The simple fix is to edit the config file and ensure that the port is set to 5432 and the tcpip_socket is set to true.
sudo pico /etc/postgresql/7.4/main/postgresql.conf
port = 5432
tcpip_socket = true