Gallery and virtualhosts

n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Sun, 2004-12-19 06:27

Hello, I was wondering if there is anyway to install multiple gallery's onto my server. I host multiple sites and a few of them want it. Is there a way to give them all there own individual gallery? Oh, and does anyone know if there are any gallery2 .deb packages?

Thanks!
----

Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): astonia.arctichosts.com/gallery
Gallery version: 1.*
Apache version: 1.*
PHP version (don't just say PHP 4, please): PHP 4
Graphics Toolkit:
Operating system: Debian Linux
Web browser/version (if applicable):

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sun, 2004-12-19 07:46

You can put a copy of the /gallery/ directory in everyone's virtual host. You will also need to give them all their own /albums/ directory as well of course.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-12-19 09:35

And there are no G2 .deb packages (yet). It's still in Alpha you know :)

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Sun, 2004-12-19 16:54

You mean just make a gallery directive in my apache.conf for each virtualhost? and then create a directory called albums in each users web direcotry?

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2004-12-19 17:47

There is no Gallery "directive" Just use a separate copy of Gallery, and a separate albums directory, for each user.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-12-19 18:48

alindeman, there is in Debian. :-)

Yeah, copy that part to the vhost config, if not all calls to /gallery, no matter which vhost, will redirect to the first installation from the debian packages.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2004-12-19 18:53

Weird stuff! :)

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Sun, 2004-12-19 18:53

Right, thats what im getting now and its annoying... Do you know the what the directives are for debian by chance?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-12-19 19:01

I don't know anything about Debian, really, but came across this on IRC last night

Quote:
<gnd> # $Id: apache.conf,v 1.2 2001/12/07 14:57:57 laz Exp $
<gnd> Alias /gallery /usr/share/gallery
<gnd> <Directory /usr/share/gallery>
<gnd> this is in /etc/gallery/apache.conf

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Sun, 2004-12-19 19:24

so then all i need to do is amke a folder called albums in each users directory?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-12-19 19:25

n3o_X, no, you will need to install the "official" gallery tarball from this site, in every users webdir.

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Sun, 2004-12-19 19:39

ok, then y do ineed to add the directive for /gallery/>?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-12-19 19:45

You need it in each vhosts config, if not the one in httpd.conf overrides it and redirects all calls to /gallery to the debian install.

You also need to set the correct path in each vhosts config.

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Sun, 2004-12-19 20:13

Ok, this is what i have as my directives in my httpd.conf file:

ScriptAlias /gallery /usr/share/gallery
<Directory /usr/share/gallery>

and then I put the .tar.gz of gallery into the folder i wanted and decompressed. When i go to the gallery site that i have set up though, it still directs me to the main one i have.

Any Idea?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-12-19 20:19

Sure, you need to add it to the vhosts too, or remove that redirect. Frankly, the best way to run multiple Gallery installs on a debian box, seems to be to not install it from the debian package in the first place.

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Sun, 2004-12-19 21:01

well, the scripalias stuff i posted above, is in the virtualhosts

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sun, 2004-12-19 22:31

The guy whos name I don't remember as I am typing this is dead to rights. Uninstall that debian package and remove any references to the /gallery dir from apache's config files or vhost files.

Once your vhosts are working properly, just untar a copy of the /gallery dir in EVERY single vhost and give EVERY single vhost its own /albums dir. This is the simplest way and requires no special configuration of directives, conf files or aliases.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-12-19 23:42

fryfrog, that awful h0bbel guy? :-)

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Mon, 2004-12-20 03:57

Lol, alright... another small quesiton... Im working on the /skel/ directory now, can i untar gallery there.. and whenever i create a new web user.. it will just move gallery to there folder? or will it mess it up?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2004-12-20 05:26

if you move it, you move it. You can copy it, and re-run the config and then enter the correct paths in the config.

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Mon, 2004-12-20 19:34

Ok, so ive done all of this.... But im getting these errors:

Warning: Unknown(): open(/var/lib/php4/sess_2a751f841f8de107ba90a0c728ff756e, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php4) in Unknown on line 0

Are these gallery errors or my php setup errors?

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Mon, 2004-12-20 21:41

Ok, sorry, got taht problem fixed.

Now, Another client wants gallery.... I only have one setup now and i just untarred the file into the first clients www folder. When i did the same to my other client and go to there website, im getting the other clients gallery....

?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2004-12-20 21:48

And you still have the aliases and the debian package? That would explain it, I guess. Start from scratch with the tarball package from this site (you can keep already made albums)

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Mon, 2004-12-20 21:58

I did, no debian package ever touched this machine at all... its all tarball

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2004-12-20 22:21

Then something must be wrong either your vhost setup, or you didn't reconfigure the copied Gallery with the new URLs and paths.

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Tue, 2004-12-21 04:20

what do i need to add to the <virtualhost> settings in my httpd.conf?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-12-21 10:14

The apache settings for that vhost. Mine looks like this:

<VirtualHost *:80>
ServerName example.com
DocumentRoot /path/to/vhost/files
</VirtualHost>
 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Tue, 2004-12-21 16:10

Yes, i have that.. my vhost looks like this:

<VirtualHost *:80>
DocumentRoot /home/kgirdler/www
ServerName kgdesigns.arctichosts.com
<Directory /home/arctichosts/www/cgi-bin>
Options ExecCGI -Indexes
SetHandler cgi-script
AddHandler cgi-script pl
</Directory>
ScriptAlias /cgi-bin /home/arctichosts/www/cgi-bin
</VirtualHost>

Now do i need to put a directive for gallery in there?

 
n3o_X

Joined: 2004-12-18
Posts: 19
Posted: Tue, 2004-12-21 16:14

Ok, it works now.. here is what i have now:
<VirtualHost *:80>
DocumentRoot /home/kgirdler/www
ServerName kgdesigns.arctichosts.com
<Directory /home/arctichosts/www/cgi-bin>
Options ExecCGI -Indexes
SetHandler cgi-script
AddHandler cgi-script pl
</Directory>
ScriptAlias /cgi-bin /home/arctichosts/www/cgi-bin
<Directory /home/chronic/www/gallery>
AllowOverride Options FileInfo
</Directory>
ScriptAlias /gallery /home/chronic/www/gallery
</VirtualHost>

Thanks for all the help!

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-12-21 17:54

Cool! :-)