ftpmampapacheapache-modules

How to install a mod_ftp module on a MAMP server


Background:

I recently installed MAMP, and am using it as a production server. The server setup did not come with an FTP server, and from what I've read, you can set up an FTP server via mod_ftp, an Apache module. I am not an expert with Apache software or server admin, although I can learn quickly. I can get to the following point and then I get stuck. Can someone please help me out?

I checked out the mod_ftp module files from the repository, here: http://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/ and I unzipped the contents into:

/Applications/MAMP/mod_ftp

I opened the README-FTP file (here):
http://svn.apache.org/repos/asf/httpd/mod_ftp/trunk/README-FTP

README-FTP:

To build and install as a DSO outside of the httpd source
build, from the ftp source root directory, simply;

    ./configure.apxs
    make
    make install

...

To build static, or as a DSO but within the same build as httpd,
copy the entire ftp source directory tree on top of your existing 
httpd source tree, and from the httpd source root directory

    ./buildconf  (to pick up ftp)
    ./configure --enable-ftp {your usual options}

and proceed as usual.

Some Questions:

  1. "build and install a DSO outside of the httpd source build, from the ftp source root directory" -- is the ftp source root directory the mod_ftp folder that I created from the zipped files I checked out from the repository?

  2. What does it mean "outside of the httpd source build"? -- is this the ServerRoot value I set in the httpd.conf as "/Applications/MAMP/Library" ?

  3. Likewise, what does "within the same httpd build" mean -- what location is this referring to?

  4. How do I know whether I want a static or DSO build?

  5. What is the statement: "copy the entire ftp source directory tree on top of your existing httpd source tree" actually asking me to do? (on top of?? As in, in the parent directory of the httpd source tree, or in the same directory?)

  6. If you've made it this far, I'd like to commend you!

From this point, I chose the first option, and entered the commands seen in README-FTP into my Terminal.

Here's what my terminal looks like:

$ ./configure.apxs
Configuring mod_ftp for APXS in /usr/sbin/apxs
Detecting features

Finished, run 'make' to compile mod_ftp

Run 'make FTPPORT=8021 install' to install mod_ftp
(The default FTPPORT is 21 if not specified)

The manual pages ftp/index.html and mod/mod_ftp.html
will be installed to help get you started.

The conf/extra/ftpd.conf will be installed as an example
for you to work from.  In your configuration file,
  /private/etc/apache2/httpd.conf
uncomment the line '#Include conf/extra/ftpd.conf'
to activate this example mod_ftp configuration.
$ make
Making all in modules/ftp
$ sudo make install
Password:
Making install in modules/ftp
/usr/share/apr-1/build-1/libtool --silent --mode=install cp mod_ftp.la /usr/libexec/apache2/
Installing configuration files
for i in /private/etc/apache2/httpd.conf /private/etc/apache2/original/httpd.conf; do \
        if test -f $i; then \
        (awk -f /applications/mamp/library/mod_ftp/build/addloadexample.awk \
            -v MODULE=ftp -v DSO=.so -v LIBPATH=libexec/apache2 \
            -v EXAMPLECONF=/private/etc/apache2/extra/ftpd.conf \
            < $i > $i.new && \
            mv $i $i.bak && mv $i.new $i \
            ) || true; \
        fi; \
        done
Preserving existing FTP documents
Installing header files
Installing online manual
$ 

So what do I do from here? I don't see mod_ftp.so anywhere, and I am particularly looking in this directory:

/Applications/MAMP/Library/modules (where all of Apache's other mod_*.so files are...)

and this directory:

/Applications/MAMP/mod_ftp/modules/ftp (where all of mod_ftp's various .c, .h and other files are)

Ultimately, I think the problem I am running into is that I don't understand how the file structures between my mod_ftp source folder and the httpd source folders need to be integrated in order to get the module running properly. Also, I don't know what I don't know, so there is probably one simple question to ask, but unfortunately I can't figure out how to ask it. Thank you for your help and patience!

Cheers!

P.S., yes, I have scoured the internet for hours.


Solution

  • I ended up scrapping MAMP and using the Mac's built in server. Through the System Preferences > Sharing menu, you can enable file sharing, which has an Options pane that allows you to "Share files and folders using FTP." I was able to obtain a static IP address through Comcast Business, and configured port forwarding on port 21 in my router to accept traffic. Then, I could use my FTP client to connect to my router with something like "123.456.789:21" as my host. Wasn't the best or most secure solution, but it worked, so take it with a grain of salt.