The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): not yet
Gallery version: Gallery 2
Apache version: ?
PHP version (don't just say PHP 4, please): ?
Graphics Toolkit: ?
Operating system: Max OS X 10.3.4
Web browser/version (if applicable): Safari 1.2, Opera 8.5, Camino 0.8
(I HAVE NO IDEA WHAT A CONFIGURATION WIZARD IS SO CAN"T ANSWER ALL THE QUESTIONS)
Normally I have an index.html file that blocks access to the root of the directory. However, for my Gallery, it uses main.php which means visitors would end up with full access to my directory!! How do I block. Web host is Dreamhost if that means anything.
Posts: 27
Web servers are configured to recognize certain file names and extension combinations and will automatically server those file types if just the directory is requested. So when you type in http://www.google.com, you actually get served up http://www.google.com/index.html (though that is usually hidden from you.) A typical web server configuration will have several options and might look something like:
index.html, index.htm, main.html, main.htm, index.pl, index.php
If you have one of those filenames in a directory, that file will be served up without having to specifically request it. Please note that this has nothing to do with "blocking" access to other files in that directory (although it does hide them from view.) The "blocking" of access to files in the directory is done by a different web server configuration option which is usually called "Indexes". If "Indexes" are allowed on that directory and there is no matching filename (index.html, etc.), then a directory listing of all files will appear. If "Indexes" are not allowed, then you will get a "File not found" error. The "Indexes" command can be centrally configured on a per directory basis. It can also be delegated to a user level by reading a file named .htaccess. There are a lot of really good tutorials on .htaccess, so I won't go into that here. If your web server is configured to use .htaccess files (many web hosting plans offer this), then you can "block" access to directory listings by creating a .htaccess file containing something like:
I believe all of the gallery directories use .htaccess files to control access to directory listings. If you are getting directory listings inside those directories, I suspect that your web server is not configured to allow .htaccess control. This is normally something that is called out in the "Configuration Wizard" - which is something you'd have to go through to configure Gallery. If you don't know what the "Configuration Wizard" is, or you haven't run through it to set up your gallery, then you need to get that done before you'll get too much farther.
Sorry to be so long winded.
Dave O
Posts: 16504
So you haven't even tried installing G2 yet then?
There is an index.php at the root of the g2 install that redirects to main.php. As long as Apache is configured to use index.php as one of the index pages you don't have to worry about a thing.
To disable directory browsing, put this in your .htaccess file
Options -Indexes
dorth, G2 does not do any type of directory access control.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Hi -- I dropped an email to my webhost to confirm "main.php" is on their list as defaults. When I acted as web admin of a server, I know I made up as many combos as possible (PHP wasn't around back then .
My host does recognize .htaccess but it's the above "default" I want. Just for the simplicity of passing on the URL to friends.
Posts: 16504
You don't want or need main.php as an index page, if you read my post, you need index.php to be listed as an index page for Apache.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Boy is my face RED!! I forgot the album is in a subdirectory. It's got the index.php. It's the root that didn't have one because _I_ forgot to create one. back to HTML school 101 <LAUGH>. Loaded a temp index.html that links to my subdirectorys index.php. All better. Thank you.