Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 37781 invoked from network); 11 Dec 2007 07:33:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2007 07:33:15 -0000 Received: (qmail 66587 invoked by uid 500); 11 Dec 2007 07:32:53 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 66564 invoked by uid 500); 11 Dec 2007 07:32:53 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 66553 invoked by uid 99); 11 Dec 2007 07:32:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2007 23:32:53 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of solprovider@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2007 07:32:32 +0000 Received: by nf-out-0910.google.com with SMTP id c10so1054632nfd for ; Mon, 10 Dec 2007 23:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=wnpnv9emoUDSX1Wb+BuPBmbFUAmZdWRLgVkS1eZwS2w=; b=bsx9g/SurosYABE9Iosu3sqKgX+PX9GxBADF/UpJAgcNemvuyj2ALtPY0kn9jaFJgJsqVa3iS1y5aQ/GvRA512eIGzwauKMSgTcMdS5OYcObWu8Bh8tWhacwXs4jQhvfA9pD3JlRs5e+zq+cKhzgBdq1aMli4BqnXvxf/l4AHqk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=q4xcfRq1UYwE5bvODxxMEHepbrA5tcC3aCsrrNJBW3pHQnZEJjtYRin3DW9H07Zry9WJeNKNDAwaHrYY8B9T5eXk/ea8tvqP/5S9i6IkF+E4sFh5mlTGy9Uo27vw+kc8AirvfL7xXStmStq7lbLpqA9YTf+zj153sgX7uRXgxXE= Received: by 10.86.4.2 with SMTP id 2mr6425622fgd.1197358349706; Mon, 10 Dec 2007 23:32:29 -0800 (PST) Received: by 10.86.31.7 with HTTP; Mon, 10 Dec 2007 23:32:29 -0800 (PST) Message-ID: Date: Tue, 11 Dec 2007 02:32:29 -0500 From: solprovider@apache.org Sender: solprovider@gmail.com To: users@httpd.apache.org In-Reply-To: <20071210160040.GA23687@fantomas.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <474fe40f.25d7720a.44ec.ffff8096@mx.google.com> <20071210160040.GA23687@fantomas.sk> X-Google-Sender-Auth: 36113fd5ba2a604d X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] How to make a website like ftpsite? On 12/10/07, Matus UHLAR - fantomas wrote: > On 30.11.07 18:21, goommy wrote: > > What i want to do is make a website like ftpsite??after open the URL i can see the file list > > and i can download all files! > > > First.i use "Options Indexes" and "DirectoryIndex none" list the all file! > > By default, when i click on the file, some types can brows directly(just like *.html *.txt *.gif *.jpg ...) and some other types will prompt download dialog for choosen(like *.tar.gz *.mp3 and so on). So i want to try when click on *.html it also appear the prompt dialog for choosen! > > And i found ??If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream".??on rfc2616! So i think maybe i can get the result by change the response header!!??qu.1: Is it a right idea??? > > So i set > > DocumentRoot /opt/webdata/www2cn > > ServerName www2.putiantaili.com.cn > > DirectoryIndex index.none > > > > #try to : all files download only ,can't browser with IE > > Options Indexes FollowSymLinks > > Header set Content-Type application/octet-stream > > Header append 123-Type 123 > > AllowOverride All > > Order deny,allow > > allow from all > > > > > > But the result is failure! ??very depressed!!?? > > And the reponse header is : > > HTTP/1.0 200 OK > > Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a > > ETag: "97b7d-2d-75d78680" > > Accept-Ranges: bytes > > Content-Type: text/plain (why not application/octet-stream) > > 123-Type: 123 (123-type header set ) > > Try using "Content-Disposition: attachment" instead of changing > "Content-Type". > "website like ftpsite"? That tells nothing. What do you mean? The OP wants to display the contents of a directory as a list of files "like an FTP server". Options Indexes will do that if no index.html file exists in the specified directory. The OP added many extra lines of configuration and managed to break it. From: http://httpd.apache.org/docs/2.2/mod/core.html#options Options Indexes FollowSymLinks The name of the directory should not be in quotes. Requires mod_autoindex. Delete the extra configuration. I have not tried Directory elements inside VirtualHosts. The documentation implies that is valid. Test using the main host; worry about the virtual host after proving your configuration is correct for the main host. HTH, solprovider --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org