Link to home
Create AccountLog in
Avatar of stephenlecomptejr
stephenlecomptejrFlag for United States of America

asked on

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

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?
Avatar of SheharyaarSaahil
Flag of United Arab Emirates image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of stephenlecomptejr


Also the version I have is 2.2.4
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


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.