Announcement

#1 2020-06-23 17:20:45

racoonradio
Member
2020-06-23
2

Looking for a alternative way to install Piwigo Multiple Site

Hello/Hi/Greetings,

I am looking for a alternative way to install Piwigo Multiple Site. But my provider doesn't allow to create a virtual host or server alias as explained in the manual. But I can create a  subdomain via DirectAdmin.

I like to have all files of the piwigo installation in map www.websitename.com/piwigo for a clean structure. And I tried the setup below.

But when I try to login on https://gallery1.websitename.com/identification.php I get a error:  404 Object not found!

    • Step 1) create a subdomain via DirectAdmin gallery1.websitename.com
    • Setp 2) Create directories
        (a)  /domains/websitename .com/public_html/piwigo
        (b) /domains/websitename.com/public_html/gallery1    
    • Set 3) Activate Multiple Site (file c)
    • set 4) performed the installation on gallery1.websitename.com


    (a) Piwigo Installation
    (b) the gallery of the subdomain, containing
    ◦ /domains/websitename.com/public_html/gallery1/local/config/database.inc.php
    ◦ /domains/websitename.com/public_html/gallery1index.php with line 14 modified

Code:

define('PHPWG_ROOT_PATH','../piwigo/');

(c) /domains/websitename .com/public_html/piwigo/local/config/config.inc.php

Code:

<?php
$conf["show_exif"] = $conf["use_exif"] = false;
 
 
#if (preg_match('#^/gallery1#', $_SERVER['SCRIPT_NAME']))
if (preg_match('/^gallery1.domainname.com$/', $_SERVER['SERVER_NAME']))
{
  $site_dir = '../gallery1';
}




if (isset($site_dir))
{
  define('PWG_LOCAL_DIR', $site_dir.'/local/');
  $conf['upload_dir'] = './'.$site_dir.'/upload';
  $conf['data_location'] = $site_dir.'/_data/';
 
  # in case there is a specific configuration file for each "site"
  @include(PHPWG_ROOT_PATH.PWG_LOCAL_DIR. 'config/config.inc.php');
}
?>

Offline

 

#2 2020-06-23 21:34:20

erAck
Only trying to help
2015-09-06
2023

Re: Looking for a alternative way to install Piwigo Multiple Site

racoonradio wrote:

(b) the gallery of the subdomain, containing
    ◦ /domains/websitename.com/public_html/gallery1/local/config/database.inc.php
    ◦ /domains/websitename.com/public_html/gallery1index.php with line 14 modified

Code:

define('PHPWG_ROOT_PATH','../piwigo/');

That is not sufficient. Check the other couple of dozens places that
define('PHPWG_ROOT_PATH',...)
you'll have to suffix them all, including in plugins, with ../piwigo/ so
./ => ../piwigo/
../ => ../../piwigo/
../../ => ../../../piwigo/
and so on, but not doing it for anything that accesses the "site" config.

Then there may still be lurking quirks even if you get to manage access to the site configs somehow, I think you're doomed by that approach. Rather have independent Piwigo installations per subdomain, there is not much sense in trying to squeeze it all into one.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact