You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marco Strullato <ma...@gmail.com> on 2010/05/04 16:30:00 UTC

[users@httpd] 206 return code - problems showing files from a smb share

Hi all, I'm having problems with httpd (httpd-2.2.3-31)

Inside a virtualhost root, I've created a new dir where I mounted a
smb share: mounting this, I gave also the ownership of these files to
apache.

path of the virtualhost: /var/www/e107
path of the share: /var/www/e107/tests
file: icon.jpg

[root@server tests]# ls -l icon.jpg
-rwxrwSrwx 1 apache apache 12066 May  3 09:13 iphone.jpg

I believe the setgid is due to the mount options, but I believe it's
not the point... however this is how I mount the share from fstab:
//<ip>/<share>    /var/www/e107/tests cifs
user,uid=48,gid=48,ro,username=username,password=password 0 0

this is the virtualhost configuration: all other apache configuration
is the centos 5.3 default.

<VirtualHost *:80>
    ServerAdmin mail@address
    ServerAlias intranet
    DocumentRoot /var/www/e107
    ServerName intranet
    ErrorLog logs/intranet-error_log
    CustomLog logs/intranet-access_log common
</VirtualHost>

If I go to http://intranet/tests/icon.jpg

I get:
10.0.1.240 - - [04/May/2010:16:20:44 +0200] "GET /tests/icon.jpg
HTTP/1.1" 206 12066

And I cannot get the icon.


Do you have suggestions?

Thanks

Marco

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 206 return code - problems showing files from a smb share

Posted by Marco Strullato <ma...@gmail.com>.
Perfect! It works

Marco

2010/5/4 Emmanuel Bailleul <Em...@telindus.fr>:
>> -----Message d'origine-----
>> De : Marco Strullato [mailto:marco.strullato@gmail.com]
>> Envoyé : mardi 4 mai 2010 16:30
>> À : users@httpd.apache.org
>> Objet : [users@httpd] 206 return code - problems showing files from a smb
>> share
>>
>> Hi all, I'm having problems with httpd (httpd-2.2.3-31)
>>
>> Inside a virtualhost root, I've created a new dir where I mounted a
>> smb share: mounting this, I gave also the ownership of these files to
>> apache.
>>
>> path of the virtualhost: /var/www/e107
>> path of the share: /var/www/e107/tests
>> file: icon.jpg
>>
>> [root@server tests]# ls -l icon.jpg
>> -rwxrwSrwx 1 apache apache 12066 May  3 09:13 iphone.jpg
>>
>> I believe the setgid is due to the mount options, but I believe it's
>> not the point... however this is how I mount the share from fstab:
>> //<ip>/<share>    /var/www/e107/tests cifs
>> user,uid=48,gid=48,ro,username=username,password=password 0 0
>>
>> this is the virtualhost configuration: all other apache configuration
>> is the centos 5.3 default.
>>
>> <VirtualHost *:80>
>>     ServerAdmin mail@address
>>     ServerAlias intranet
>>     DocumentRoot /var/www/e107
>>     ServerName intranet
>>     ErrorLog logs/intranet-error_log
>>     CustomLog logs/intranet-access_log common
>> </VirtualHost>
>>
>> If I go to http://intranet/tests/icon.jpg
>>
>> I get:
>> 10.0.1.240 - - [04/May/2010:16:20:44 +0200] "GET /tests/icon.jpg
>> HTTP/1.1" 206 12066
>>
>> And I cannot get the icon.
>>
>>
>> Do you have suggestions?
>>
>> Thanks
>>
>> Marco
>>
>
> Hi,
>
> Can you try with "EnableSendfile Off" ?
> From http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile :
> (...)
> With a network-mounted DocumentRoot  (e.g., NFS or SMB), the kernel may be unable to serve the network file through its own cache.
> (...)
>
> Regards.
>
> Emmanuel
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



-- 
Marco Strullato
cell: +393288462393
skype: marco.strullato

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] 206 return code - problems showing files from a smb share

Posted by Emmanuel Bailleul <Em...@telindus.fr>.
> -----Message d'origine-----
> De : Marco Strullato [mailto:marco.strullato@gmail.com]
> Envoyé : mardi 4 mai 2010 16:30
> À : users@httpd.apache.org
> Objet : [users@httpd] 206 return code - problems showing files from a smb
> share
> 
> Hi all, I'm having problems with httpd (httpd-2.2.3-31)
> 
> Inside a virtualhost root, I've created a new dir where I mounted a
> smb share: mounting this, I gave also the ownership of these files to
> apache.
> 
> path of the virtualhost: /var/www/e107
> path of the share: /var/www/e107/tests
> file: icon.jpg
> 
> [root@server tests]# ls -l icon.jpg
> -rwxrwSrwx 1 apache apache 12066 May  3 09:13 iphone.jpg
> 
> I believe the setgid is due to the mount options, but I believe it's
> not the point... however this is how I mount the share from fstab:
> //<ip>/<share>    /var/www/e107/tests cifs
> user,uid=48,gid=48,ro,username=username,password=password 0 0
> 
> this is the virtualhost configuration: all other apache configuration
> is the centos 5.3 default.
> 
> <VirtualHost *:80>
>     ServerAdmin mail@address
>     ServerAlias intranet
>     DocumentRoot /var/www/e107
>     ServerName intranet
>     ErrorLog logs/intranet-error_log
>     CustomLog logs/intranet-access_log common
> </VirtualHost>
> 
> If I go to http://intranet/tests/icon.jpg
> 
> I get:
> 10.0.1.240 - - [04/May/2010:16:20:44 +0200] "GET /tests/icon.jpg
> HTTP/1.1" 206 12066
> 
> And I cannot get the icon.
> 
> 
> Do you have suggestions?
> 
> Thanks
> 
> Marco
> 

Hi,

Can you try with "EnableSendfile Off" ?
>From http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile :
(...)
With a network-mounted DocumentRoot  (e.g., NFS or SMB), the kernel may be unable to serve the network file through its own cache.
(...)

Regards.

Emmanuel

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org