On Thu, Aug 21, 2003 at 08:51:11PM +0100, Stroller wrote: > My first question is: is it possible to have apache return requests for > stuff.stroller.uk.eu.org with /home/httpd/htdocs/stuff/index.html ? Is > it possible to do this automagically for all foo.stroller.uk.eu.org > bar.stroller.uk.eu.org & grunt.stroller.uk.eu.org ??
Yes. For this you want to do some reading on name-based virtual hosts. I suggest [1]. There is probably an example in /etc/apache2/conf/vhosts/vhosts.conf (make sure this file is included by /etc/apache2/conf/apache2.conf). > Secondly: is it possible to redirect http://mail.stroller.uk.eu.org to > https://mail.stroller.uk.eu.org to ensure encryption..? You may be able to do this with mod_rewrite (again see [1]), but I'm not sure about the protocol change (from http to https). You may have to find some way to send a http header that looks like Location: https://mail.stroller.uk.eu.org/ back to the browser. The only way I know to do this off the top of my head is using php's header() function, though you can definitely do it with any sort of cgi or dynamic web scripting language (and maybe with SSI). > Previous installations of Apache that I have had, have allowed me to > browse to myserver.com/somedir/ and see a list of files to click on & > download (or click on & view in the browser in the case off pictures) > if there is no index.html in that directory. On my default Gentoo > installation of Apache2 I get the message "Forbidden - You don't have > permission to access /somedir/ on this server." How can I change this > behavior..? I think it is best to enable directory contents listings on > a per-directory basis. I've had problems with files with spaces in the > names in the past before - when clicking on the link in the directory > listing it the file won't download. IIRC this is something to do with > the space character and %20. Can anyone tell me about this..? You need to have the option Indexes set in your apache configuration. IIRC gentoo turns it off by default. Check /etc/apache2/conf/commonapache2.conf and search for Indexes. Anywhere you see the word 'Indexes' alone turns the option on; anywhere it's `-Indexes' turns the option off. > Finally, it's be kinda handy to arrange my webpages on a template > basis: if Apache finds no index.html but does find content.txt it > should dynamically create & display a page from cat'ting some > predefined head.html with content.txt and a predefined tail.html. I > believe that Apache's "server-side includes" does this. Is that > correct, or am I much confused..? Does anyone have any pointers to > suitable tutorials, or any helpful advice on this..? I'm not sure exactly what you're after. Server-side includes are well documented at [1], and they can do the including of head.html and tail.html. Also in /etc/apache2/conf/commonapache2.conf you will find the directive "DirectoryIndex". It defines a list of files; whenever a request is sent for a directory, the first file in the list which also exists in that directory is sent back to the browser. Good luck, Owen References: 1. http://httpd.apache.org/docs-2.0 -- Howard Dean will enable hicks like me to get broadband. http://www.deanforamerica.com/ -- [EMAIL PROTECTED] mailing list
