How do I create a web page that will allow me to download a file off my computer?

Posted on 2007-10-01
Last Modified: 2013-12-14
I've got a very basic startup html for my Apache webserver and I want to change it to where when I enter my URL it takes me to a page that I can download a file off my machine at home.  I currently have PC anywhere on my home machine to make any appropriate changes but I'm unsure how or what I need to do to change the startup page to allow me to download this one large file.  Any suggestions?
Question by:stephenlecomptejr
    LVL 65

    Accepted Solution

    pardon me if im misunderstanding here.....but if the required file is already uploaded on the server, why don't you just give the direct path to the file in the address bar and it should prompt you to download it......
    LVL 1

    Author Comment

    Also the version I have is 2.2.4
    LVL 1

    Author Comment

    Oops - just not thinking correctly on the matter.

    I should have known better to do that.

    But I would like to secure it better and saw the following website to try and do so:

    I've tried to change the .conf file as follows since the path is simiply on my D:\ftpdocs but having trouble understanding the user part of this?

    #=                           example ftp configuration                                =
    #= you must create the ftpdocs/ directory under the default20/ directory              =
    #= pay attention to the permissions, and make sure that the apache (runtime) user can =
    #= write and read the directory. The default apache runtime user is nobody/nobody,    =
    #= but this can be changed in the conf file.                                          =

    # Place the loadmodule line at the end of the other LoadModule statements
    # Change the path below to match your installation path.

    LoadModule ftp_module "/usr/local/covalent/ers3/apache2.0/modules/covalent/"

    Listen 21
    <VirtualHost _default_:21>

          FTP On
          DocumentRoot ""
          FTPHomeDir /
          FTPJailUser On
          FTPOptions CreateHomeDirs
    #     FTPBannerMessage file:conf/welcome.msg

         <Directory "d:/ftpdocs">
             AuthType Basic
             AuthName ftp_file_authorization
             AuthUserFile "/usr/local/covalent/ers3/servers/default20/userfile"
             Require valid-user

          ErrorLog logs/ftp_error_log
          LogFormat "%u [%a] %r" cmd_log
          LogFormat "%{%b %e %H:%M:%S %Y}t %T %a %B %U %M %F %d %W %u %S %Z %Y" trans_log
          CustomLog logs/ftp_command_log cmd_log
          CustomLog logs/ftp_transfer_log transfer_log env=do_trans_log


    LVL 50

    Expert Comment

    by:Steve Bink
    As far as securing files in Apache, SSL does a wonderful job at it.  I've never set up an FTP through apache, but I do have secured file stores protected by SSL and an associated user list on both of my webservers.

    Unless you need the user management functionality included in FTP servers, that should work just fine for you.


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now