LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-02-2010, 05:27 AM   #1
shifter
Member
 
Registered: May 2006
Distribution: Slackware, DragonFly
Posts: 233

Rep: Reputation: 30
download through http


I'd like to permit to start download file when I click over some links.
How can I to start download files through http protocol with apache 2?

Thank you in advance,
savio

Last edited by shifter; 07-02-2010 at 05:29 AM.
 
Old 07-02-2010, 06:12 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What? Be clearer.
 
Old 07-02-2010, 06:18 AM   #3
shifter
Member
 
Registered: May 2006
Distribution: Slackware, DragonFly
Posts: 233

Original Poster
Rep: Reputation: 30
I want click over a link and download file with http (or ftp) protocol.
I don't know how implement this feature, for example:

<a href="/var/www/download/file.tar.gz">Download file</a>

and download file

Last edited by shifter; 07-02-2010 at 06:20 AM.
 
Old 07-02-2010, 07:51 AM   #4
UnderV
Member
 
Registered: Mar 2010
Posts: 39

Rep: Reputation: 18
Talking

I will create small example.

Create index.html file in Your Apache document root directory (for RedHat based OS it usually is: /var/www/html)
Edit index.html:
Code:
 <html>
  <head>
 </head>

 <body>
  <a href="download/file.tar.gz">Download file</a>
 </body> 
 </html>
Start Apache server (in RedHat: /etc/init.d/httpd start)

If You are working on machine with apache server then enter in browser http://localhost and You will see download link for file.
Remember that link will download file located in "/var/www/html/download" directory.

If You need to allow anybody else to access this link, then also edit Firewall rules (port 80).

Is this solution for Your problem?
If not, then please provide more information for Your problem.
 
Old 07-02-2010, 10:01 AM   #5
shifter
Member
 
Registered: May 2006
Distribution: Slackware, DragonFly
Posts: 233

Original Poster
Rep: Reputation: 30
Ok, it works! Thank you very much.
 
Old 07-02-2010, 10:20 AM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by shifter View Post
Ok, it works! Thank you very much.
Under "Thread Tools" above the first post in the thread, click on the drop-down item that says the problem is solved. That flags it for others so if they have a similar problem, they will know a solution is likely in that thread.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Download via HTTP and command line? gdeward Linux - General 4 07-23-2006 06:54 PM
Mandrake HTTP and FTP download MACSRULE Mandriva 2 04-11-2004 01:38 PM
help to download libgcc_s.so.1 via http lel800 Linux - Software 2 10-15-2003 03:57 PM
HTTP Download for linux vishalwaghmare Linux - Newbie 4 12-20-2002 02:53 AM
Linux HTTP download vishalwaghmare Linux - Newbie 1 12-16-2002 05:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration