General discussion


apache 2.x integrating ftp server

By sarahmeggs ·

would like to be able to have ftp server integrated with apache. HAve installed vsftpd which works from command line and windows gui, but need to have webpage access for download.

How do I configure apache to allow this? I ahve put an alias statement in httpd.conf, with Directory stanza, but fpt://<server>/<ftp alias> gives permission denied error.

Thanks, sm

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to apache 2.x integrating ft ...

http downloads actually run faster than ftp downloads do.

most people only add the ability to ftp upload to a webserver.
but according to the apache docs:

FTP Proxy
Why doesn't file type xxx download via FTP?

You probably don't have that particular file type defined as application/octet-stream in your proxy's mime.types configuration file. A useful line can be

application/octet-stream bin dms lha lzh exe class tgz taz

How can I force an FTP ASCII download of File xxx?

In the rare situation where you must download a specific file using the FTP ASCII transfer method (while the default transfer is in binary mode), you can override mod_proxy's default by suffixing the request with ;type=a to force an ASCII transfer. (FTP Directory listings are always executed in ASCII mode, however.)
How can I access FTP files outside of my home directory?

An FTP URI is interpreted relative to the home directory of the user who is logging in. Alas, to reach higher directory levels you cannot use /../, as the dots are interpreted by the browser and not actually sent to the FTP server. To address this problem, the so called Squid %2f hack was implemented in the Apache FTP proxy; it is a solution which is also used by other popular proxy servers like the Squid Proxy Cache. By prepending /%2f to the path of your request, you can make such a proxy change the FTP starting directory to / (instead of the home directory). For example, to retrieve the file /etc/motd, you would use the URL:

ftp://user@host/%2f/etc/motd "

Related Discussions

Related Forums