Virtual hosts
To have a single instance of apache serve two domain names (with separate web pages) use virtual hosts:
<VirtualHost *>
...
ServerName www.thayersfarm.com
ServerAlias thayersfarm.com *.thayersfarm.com
DocumentRoot /var/www/thayersfarm/
...
</VirtualHost>
<VirtualHost *>
...
ServerName www.carmarthenshirehistorian.org
ServerAlias carmarthenshirehistorian.org *.carmarthenshirehistorian.org
DocumentRoot /var/www/historian/
...
</VirtualHost>
Unable to load Gallery images
Problem
galleryadd.pl
failed to load certain images. Unfortunately none of the default logging highlighted the problem, until I added some logging in
gallery_remote2.php
:
case 'add-item':
$chris_error = $_FILES['userfile']['error'];
echo "File upload error: $chris_error\n";
gr_add_item( $gallery, $response, $_FILES['userfile']['tmp_name'], $_FILES['userfile']['name'],
getRequestVar('caption'), getRequestVar('force_filename'), getRequestVar('auto_rotate') );
This printed the error code for the uploaded file:
1
,
UPLOAD_ERR_INI_SIZE
(codes found
here).
Solution
Increase the default allowable file size,
upload_max_filesize
in
php.ini
, from
2M
to
10M
Restart apache.
to top