Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-07-2010, 08:13 AM
|
#1
|
Member
Registered: Apr 2010
Distribution: debian
Posts: 42
Rep:
|
Sharing files - FTP / Apache
Hi there. I've been setting up a FTP server with pure-ftpd. Everything is going ahead. I have tested the ftp with filezilla and it works perfectly. After this, I wanted to access my ftp files through the web. Because of that, I've installed apache web server and published the ftp files directory by creating a symbolic link in /var/www pointing to the ftp directory. Up to this point I have no problems at all. I'm able to download files from my server using any web browser. The fact is that, during this process, I realized that I'm not using ftp anymore. I mean, if someone uses the web to download files from my "public ftp server" he is using apache, not pure-ftpd. Is there any way to use ftp server with http without dropping ftp capabilities? Please let me know If I'm not accurate enough to describe this issue.
Thanks in advance.
|
|
|
12-07-2010, 08:57 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
|
Hi,
You can use a browser to download files from ftp servers. Just use ftp://ftp.server.com in the browser address bar
And of course you don't need the symlink in apache docroot if you don't like to give web access to your files.
Regards
|
|
|
12-07-2010, 10:01 AM
|
#3
|
LQ Newbie
Registered: Dec 2010
Distribution: OpenSUSE 10.3
Posts: 7
Rep:
|
If you want people to download files from your FTP server using pure-ftp, you need to enable anonymous login (at least, if you want everyone to be able to access your files). They will, like bathory mentions, require to declare the use of the ftp protocol rather than the http protocol (which will, OC, never work with an ftp daemon). To make this easier, you can make a link in your apache webpage to ftp://whateveryourdomainmaybe and it will immediately take them there. You can choose whether you want anonymous logged in users to be able to upload files, but that may not be advisable.
|
|
|
12-07-2010, 03:03 PM
|
#4
|
Member
Registered: Apr 2010
Distribution: debian
Posts: 42
Original Poster
Rep:
|
Bathory, It's very clear what you've mentioned. I use ftp://myPublicIP:PortName to access through the web and the result was the expected. Thanks for that.
Morfanaion, I want to link ftp://myPublicIP:PortName to my current domain, say, mydomain.com (this domain is currently pointing to the ftp directory published by apache).
I don't knwow how to accomplish this.
I created a symLink in /var/www like
Code:
ln -s ftp://myPublicIP:PortName mydomain.com
But It seems that it is wrong.
Last edited by astalavista2000; 12-07-2010 at 03:45 PM.
|
|
|
12-08-2010, 05:50 AM
|
#5
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
|
Hi,
If you want to give users the ability to connect to your ftp server from apache, you can use a Redirect:
Code:
Redirect /ftp ftp://myPublicIP:PortName
This way when a user visits http://myPublicIP/ftp it will be automatically redirected to the ftp server.
Regards
|
|
|
12-08-2010, 08:55 PM
|
#6
|
Member
Registered: Apr 2010
Distribution: debian
Posts: 42
Original Poster
Rep:
|
Bathory, you´re right. I used a Redirect in my httpd.conf and the ftp in now accesible through apache.
Thanks to you and morfanaion for your help.
Regards
Quote:
Originally Posted by bathory
Hi,
If you want to give users the ability to connect to your ftp server from apache, you can use a Redirect:
Code:
Redirect /ftp ftp://myPublicIP:PortName
This way when a user visits http://myPublicIP/ftp it will be automatically redirected to the ftp server.
Regards
|
|
|
|
All times are GMT -5. The time now is 04:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|