You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Klaus Neudecker <kl...@ndckr.de> on 2020/02/03 18:17:31 UTC

[users@httpd] Apache2 + NAS in DocumentRoot = faulty PDFs delivered ???

Hello,

I have installed an Apche2 server under Raspbian Buster (latest update) on a
Raspberry Pi 4 4GB computer. (In combination with MariaDB and PHP on the
Rapberry - therefore the Raspberry - he manages the DB-managed www-pages with
the links to the PDFs e.g.! The database files and the most important
Document-Root-HTML/PHP-files are on a mounted on a fast USB SSD drive.) As
there are lots (~2 TB) of big documents (PDF, JPEG, PBG e.g.) I store them on
a Synology NAS DS218J.

  

Problem:

When the Apache2 deploys files from the NAS, they are corrupt.
_Not_really_big_corrupt_ (same byte-size), but mostly after one or two pages
the background colour of the pdf changes (green, purple, grey e.g. instead of
white) and then after another couple of pages the pdf is finally corrupted.
The same with jpegs - e.g. half of the picture is ok, the rest gets e.g. grey
and has a 'ghost image' of the rest of the jpeg above.

The NAS is mounted on the Raspberry Pi with the following entry in the
/etc/fstab:

  

//192.168.2.104/www /www/nas cifs
username=Klaus,password=PASSWORT,vers=2.0,xsystemd.automount,x-systemd.requires=network-
online.target 0 0

  

Where /www/ is the DocumentRoot of the Apache2.

  

Try 1:

I opened the same pdfs e.g. with a double click in the file manager of the
raspberry via the mounted link /www/nas/... - and they are completely ok. So
for me the mounting of the NAS seems ok.

  

Try 2:

I put the same files onto the USB SSD drive, wich is mounted in Apache
DocumentRoot at /www/ssd/, and it is deployed fine. So for me the combination
of Apache2 and the 'general' file system and the pdf seems to be ok

  

Try 3:

(This was the first configuration, which I changed after this error to the
actual one.)

I mounted the NAS to /media/nas and made an Apache2 'Alias' (+ <Directory...>)
for this directory into Apache2's DocumentRoot - The pdfs from the NAS are
deployed faulty.

  

Guess:

For me it seems the __combination__ of Apache2 and the SMB mounted NAS brings
up the problem.

  

Has anyone got an idea what to do???

\--------------------------------------------------------------------- To
unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional
commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 + NAS in DocumentRoot = faulty PDFs delivered ???

Posted by Klaus Neudecker <kl...@ndckr.de>.
Hello Eric, hello mailinglist,

today I made just a little try (after "EnableSendfile OFF" didn't work 
and I had no more clue at all) and changed the Parameter just to 
"EnableSendfile On" to see what's going to happen. And now it works!!!

_Thank_you_very_much_(!) for the help, and my problem is certainly 
something arround your "SendFile" hint!

Perhaps it helps someone else! (Therefore - last try: try the opposite 
of what is written in the handbook!  ;-)  )

Very sincerely

Klaus

Am 03.02.2020 um 19:20 schrieb Eric Covener:
>> Guess:
>> For me it seems the __combination__ of Apache2 and the SMB mounted NAS brings up the problem.
>>
>> Has anyone got an idea what to do???
> Could try:
>
> EnableSendfile OFF
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 + NAS in DocumentRoot = faulty PDFs delivered ???

Posted by Eric Covener <co...@gmail.com>.
> Guess:
> For me it seems the __combination__ of Apache2 and the SMB mounted NAS brings up the problem.
>
> Has anyone got an idea what to do???

Could try:

EnableSendfile OFF



-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org