|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
file download configuration
I was wondering how I could configure my apache webserver so that clients can download files from my server when they click on a link to, for example, an .exe file or .zip file. Right now, when you click on a link with such an extention, it pulls up an error page. Any tips??
|
|
#2
|
|||
|
|||
|
>> when they click on a link to, for example, an .exe file or .zip file
You don't need to manually configure that as that's configured in mime.types file already by default. >> it pulls up an error page Which error code? 404? 403? 401? 500? Since you haven't provided sufficient details, what you can try yourself is to upload an hello.html file to the same directory where your zip/exe files reside, then try to access that hello.html file and tell us what happen. |
|
#3
|
|||
|
|||
|
It gives me a 404 error. Say I have a zip file in my home directory. I post a link to URL and it gives me a 404 "Page cannot be found" error.
|
|
#4
|
|||
|
|||
|
>> I have a zip file in my home directory
What's your home directory? Keep in mind, Apache doesn't serve files that reside in home directory. You need to put your stuffs to your so-called DocumentRoot. Like I said, don't always assume it's a MIME type problem when you get a 404 error when trying to access a link to zip/exe file. Start out with a plain hello.html file and make sure you know what DocumentRoot is. If not, go read up Apache docs. |
|
#5
|
|||
|
|||
|
I posted a page in the directory with my files and got it work, sorta. Now, it pulls up a page with a broken image sign when i click on the link. If I right click on the link, I can "save as" and it the client can save the file, but, how can I have the client be able to download the file automatically when they click on the link?
|
|
#6
|
|||
|
|||
|
>> to download the file automatically when they click on the link?
For what file type? Like I said in my first post, for zip/exe, those extensions should be prompted for download automatically. >> it pulls up a page with a broken image sign when i click on the link Again, you need to give us more details if you can't solve the problem yourself. All I can do at this point is to do some guessing. You need to add a trailing slash on the path, for example: Alias /icons/ "/www/icons/" |
|
#7
|
|||
|
|||
|
Ah, I see. Thanks for your help :-)
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > file download configuration |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|