DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   IT Professionals' Lounge (http://www.daniweb.com/forums/forum5.html)
-   -   apache as an ftp server (http://www.daniweb.com/forums/thread104253.html)

williebens Jan 10th, 2008 12:21 pm
apache as an ftp server
 
Hello forum:

I am trying to make apache an ftp server. I think this is possible because apache has mod_ftp.
Below is a snippet of my httpd.conf file that has the configuration for a virtual host to serve as an ftp server:

.
.
.
LoadModule ftpd_module modules/mod_ftpd.so
LoadModule ftpd_default_module modules/mod_ftpd_default.so
.
.

NameVirtualHost 192.168.x.x

Listen 21
<VirtualHost *:21>
#FTP On
FtpProtocol On
FtpAllowActive Off
ServerName ftp.myboxdomain.com or IP
DocumentRoot /var/www/html/ftpdocs
<Directory /var/www/html/ftpdocs>
# AuthName "FTP Server"
# AuthType Basic
# AuthUserFile /etc/httpd/conf/passwd/.htpasswd
# Require valid-user
Order allow,deny
# Allow from all
Allow from 192.168.x.x
</Directory>
</VirtualHost>

Now the following is my host file on my linux box:
# Do not remove the following line, or various programs
# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost
192.168.x.x www.myhostname.com myhostname
192.168.x.x ftp.192.168.x.x or IPaddress

If there is a solution someone can help me find, please let me know. I have been working on this for three days, and I just do not get it right. I also wonder if I have to use an ftp server like proFTPD along with apache.

I am running Apache/2.0.59 (CentOS) Server.
Thanks.
--Willie

DimaYasny Jan 10th, 2008 12:55 pm
Re: apache as an ftp server
 
the best way to go is to set up a normal ftp server besides Apache. these things are to be used as intended.

here is the description: http://incubator.apache.org/ftpserver/

since this is a java written thing, I wouldn't get near it for performance.

williebens Jan 10th, 2008 3:23 pm
Re: apache as an ftp server
 
Hello Dima Yasny:

I went to that site before, but I did not
find it useful. When you say to set up a
normal ftp server besides Apache, do
you mean I need to have an ftp server,
like proFTP running, together with the apache
ftp virtual directory?

There has to be a way to achieve this.
I just want users to be able to upload
and download files via a browser. Just
like I would download winzip for example.

Thanks.
--Willie

DimaYasny Jan 10th, 2008 3:27 pm
Re: apache as an ftp server
 
the ftp will have nothing to do with the apache VD. it's just a service. if you want it's name to be known as ftp.domain.com instead of www.domain.com you just need to add the ftp.domain.com A record to your DNS

williebens Jan 10th, 2008 5:04 pm
Re: apache as an ftp server
 
OK. I will keep working on this until I get it sometime. Have you ever got this working
under apache? I mean, making apache an
ftp server as well as a web server?

Thanks.
--Willie

DimaYasny Jan 10th, 2008 5:07 pm
Re: apache as an ftp server
 
I have set up many linux servers with apache as http server and vsftpd/proftpd/wu-ftpd as ftp servers

apache is NOT and ftp server though.

DimaYasny Jan 10th, 2008 5:11 pm
Re: apache as an ftp server
 
http://www.outoforder.cc/projects/apache/mod_ftpd/docs/

this is the documentation you might need. though as I said - there is no need to reinvent the wheel, when there are perfectly good ftp daemons out there

williebens Jan 10th, 2008 6:58 pm
Re: apache as an ftp server
 
Ok. That is a good site. If you look at my first post, it is really about the same
thing I have configured in the apache virtual server.

Now, I think this is the way I should do things.

1) Configure an ftp virtual server like the one I have.
2) Have an ftp daemon running like vsftpd or proftpd.
3) Create accounts for vsftpd or proftd or whatever daemon I am using.

Can you suggest me about a server name for the ftp virtual host.
I am not doing DNS for this one, I am just editing my /etc/hosts file
accordingly like I posted.

Thanks a lot for your insights and your time on this.
--Willie

DimaYasny Jan 10th, 2008 7:00 pm
Re: apache as an ftp server
 
can you, in detail, describe what exactly you want the server to do?

williebens Jan 10th, 2008 7:09 pm
Re: apache as an ftp server
 
I want to get apache running as an ftp server. I am not sure, however, if I need an ftp daemon like proftpd running along with the apache ftp virtual directory. I want users to upload and download files via a browser. Let us say I create a directory /home/ftpdocs. Then my document root would be /home/ftpdocs.

I want apache to display, via a browser, whatever files users upload to that particular directory on the server as well as be able to download those files.

Like I said, I do not know if I need a separate ftp daemon running or just apache with the ftp virtual directory.

Thanks a lot.
--Willie


All times are GMT -4. The time now is 12:45 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC