404 at www.mysite.com/gallery2 after apt-get install gallery2

psi36

Joined: 2006-02-16
Posts: 16
Posted: Wed, 2007-04-25 09:50

I just did an install with "sudo apt-get install gallery2", but when I surf to http://ddhuyvet.no-ip.info/gallery2 I get a "404 Not Found".

Gallery version: 2.1.1-1
PHP version: 5.1.6
PHPInfo Link: http://ddhuyvet.no-ip.info/info.php
Webserver: Apache 2.0.55-4ub
Database: PostgreSQL 8.2.3-1~ed
Operating system: Linux 2.6.17-10-server, Ubuntu 6.10
Browser: Firefox 2.0.0.3

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-04-25 10:52

maybe it's at apache2-default/gallery2/, who knows... depends on your linux distribution.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
swelf

Joined: 2006-10-06
Posts: 23
Posted: Wed, 2007-04-25 11:01

I had the same problem when I did a gallery2 install on Debain Sarge. I had to edit /etc/apache2/sites-available/default and add a new alias. You should check that or you could add an Include in apache2.conf to /etc/gallery2/apache.conf and modify that to your needs. Hope that helps.

 
psi36

Joined: 2006-02-16
Posts: 16
Posted: Wed, 2007-04-25 14:22

I've added the lines

#Include Gallery2 configuration:
Include /etc/gallery2/apache.conf

to /etc/apache2/apache2.conf
/etc/gallery2/apache.conf itself I left unchanged:

#Alias /gallery2 /usr/share/gallery2

<Directory /usr/share/gallery2>
  Options FollowSymLinks
  AllowOverride Limit Options FileInfo
</Directory>

# some people prefer a simple URL like http://gallery2.example.com
#<VirtualHost 1.2.3.4>
#  DocumentRoot /usr/share/gallery2
#  ServerName gallery2.example.com
#</VirtualHost>

I restarted Apache, but still get the 404 Error.
Did I do something wrong or did I forget something?

 
schultmc
schultmc's picture

Joined: 2003-05-21
Posts: 108
Posted: Wed, 2007-04-25 16:32

Edit /etc/gallery2/apache.conf and remove the comment (#) in front of Alias /gallery2 /usr/share/gallery2) and restart apache. Once the alias has been enabled, your gallery should then be available at www.example.com/gallery2 (where www.example.com is replaced with your actual host name.).

--
Debian gallery package maintainer

 
psi36

Joined: 2006-02-16
Posts: 16
Posted: Wed, 2007-04-25 20:37

I uncommented the first line: Alias /gallery2 /usr/share/gallery2

And restarted Apache, but got a warning:

$ apache2 -k restart
[Wed Apr 25 22:00:32 2007] [warn] The Alias directive in /etc/gallery2/apache.conf 
at line 1 will probably never match because it overlaps an earlier Alias.

And I still et a 404 error.

 
schultmc
schultmc's picture

Joined: 2003-05-21
Posts: 108
Posted: Wed, 2007-04-25 20:57

The warning says the alias will never match. I'd edit the apache configuration for www.mysite.com and set the Alias there. The 404 should go away once you get /gallery2 to point to the gallery files.

--
Debian gallery package maintainer

 
psi36

Joined: 2006-02-16
Posts: 16
Posted: Wed, 2007-04-25 21:16

If I set the alias in /etc/apache2/apache2.conf I get the same warning:

$ apache2 -k restart
[Wed Apr 25 23:09:45 2007] [warn] The Alias directive in /etc/apache2/apache2.conf 
at line 395 will probably never match because it overlaps an earlier Alias.

I understand I need to get /gallery2 to point to the gallery files, I just don't know how.

 
schultmc
schultmc's picture

Joined: 2003-05-21
Posts: 108
Posted: Wed, 2007-04-25 23:00

Is all of your apache configuration in /etc/apache2/apache2.conf? There's some other alias you have defined in some configuration file that is effectively nullifying the /gallery2 alias. If you'd like to e-mail your configuration file(s) to me at

I can see if I can diagnose the issue.

--
Debian gallery package maintainer

 
psi36

Joined: 2006-02-16
Posts: 16
Posted: Thu, 2007-04-26 07:19

I think I found why this alias is already defined:
In /etc/gallery2/apache.conf there's a link to /etc/gallery2/apache.conf
Thing is that I edited /etc/gallery2/apache.conf uncommenting Alias /gallery2 /usr/share/gallery2 so the alias should work.