[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

share files by apache listing a directory

Posted on 2009-02-20
11
Medium Priority
?
1,165 Views
Last Modified: 2013-12-15
Hi everybody,
I have an Apache Web Server with a VirtualHost where i shared a directory using de "Option Indexes" directive into a Directory directive. It works, but when i try to download a binary file like an image or an zip file etc... don't recive anything, the file that i download has 0 bytes. Nevertheless when i try download a text/plain file, it is downloaded correctly.

There are not log errors

I attach the code of httpd.conf
<VirtualHost XXX.XXX.XXX.XXX:80>
ServerName ftp.itacyl.es:80
DocumentRoot "/var/ftp/"
CustomLog "/apps/apache/logs/access_ftp.log" common
 
<directory "/var/ftp">
        Options Indexes FollowSymLinks Multiviews
        IndexIgnore .*
        AllowOverride none
        Order allow,deny
        Allow from all
</directory>
</VirtualHost>

Open in new window

0
Comment
Question by:itacyl
  • 7
  • 2
  • 2
11 Comments
 
LVL 23

Expert Comment

by:Maciej S
ID: 23691274
And you are completely sure, that those files are bigger than 0 bytes? :)
Can you download them from server itself (using wget for example)?
Can you provide output of "ls -l /var/ftp"?
0
 

Author Comment

by:itacyl
ID: 23691369
Yes im sure, yu can enter and see it http://ftp.itacyl.es
this link don't download http://ftp.itacyl.es/cartografia/Ortofotos/untitled.bmp
but this other download correctlly http://ftp.itacyl.es/RINEX/horario_30s/2009/005/vala005a.09g

colud be mime types?
0
 

Author Comment

by:itacyl
ID: 23691391
the version of this apache is 2.2.11
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:itacyl
ID: 23691633
i have modify de configuration, but i have the same problem:

<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName ftp.itacyl.es:80
DocumentRoot "/var/ftp/"
ErrorLog "/apps/apache/logs/ftp_errorlog"
CustomLog "/apps/apache/logs/access_ftp.log" common
 
<directory "/var/ftp">
 
        Options Indexes Multiviews FollowSymLinks
        IndexOptions FancyIndexing IconsAreLinks
        IndexIgnore .*
        AllowOverride none
        Order allow,deny
        Allow from all
 
</directory>
 
<IfModule mod_limitipconn.c>
    <Location /var/ftp>
        MaxConnPerIP 3
        # In this case, all MIME types other than audio/mpeg and video*
        # are exempt from the limit check
        #OnlyIPLimit audio/mpeg video
    </Location>
</IfModule>
 
</VirtualHost>

Open in new window

0
 
LVL 23

Expert Comment

by:Maciej S
ID: 23691851
I have to admit, that I have no idea what can be causing such behavior.
Can you provide output of: "ls -la /var/ftp/cartografia" command?
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23692012
Hi yah just a quck thought

have you add the .zip extenstion in your apache file or in etc/mime.types ??

for etc/mime.types add the extenstion of the file

like this line

application/vnd.openxmlformats       docx pptx xlsx    [ add your extenstion]

try adding that extension in apache configuraiton file aswell

then restart the apache
see if it helps
0
 

Author Comment

by:itacyl
ID: 23708987
Hi,
oklit, the result of ls -la /var/ftp/cartografia is:
"total 192
drwxrwxrwx 1 root root      0 2009-02-05 09:17 .
drwxr-xr-x 6 root root 143360 2009-02-23 02:53 ..
-rwxrwSrwx 1 root root    846 2007-10-04 13:31 banner
drwxrwxrwx 1 root root      0 2008-11-03 17:39 Catalogo
-rwxrwSrwx 1 root root    846 2007-10-04 13:31 Condiciones de uso.txt
-rwxrwSrwx 1 root root   8402 2008-12-15 11:37 Direcciones WMS de acceso a ortofotos de Castilla y Leon.txt
drwxrwxrwx 1 root root      0 2009-01-07 10:27 MDE
drwxrwxrwx 1 root root      0 2009-02-20 13:00 Ortofotos
-rwxrwSrwx 1 root root  27368 2008-12-15 11:39 Servicios WMS de Ortofotos de Castilla y Leon.xml
"
0
 

Author Comment

by:itacyl
ID: 23709011
Hi,
fosiul01, the extensions zip, bmp, txt... alredy exist on mime.types file
0
 

Author Comment

by:itacyl
ID: 23709137
Hi everybody,
i think that i know the problem, some of these folders are mounted with cifs (cartografia is one of these), and if i put a file in a folder that is local its works fine, so i think that the apache see the files in mounted folders like a pointer or link but dont serve the target.

Anybody have an idea to solve it?
0
 

Accepted Solution

by:
itacyl earned 0 total points
ID: 23709195
im think that i solve it
with "EnableSendfile off" into httpd.conf file

thaks to everybody
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23709201
HI good morning
sorry due to weakend didnot able to reply

its good to see your problem is solved and sorry i was not helpfull for this occassion...
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month18 days, 14 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question