[Isis-users] Arquivo digitais fora do servidor - Digital filesoutside the web server

Edwin Hübner edwin.hubner at gmail.com
Mon Jun 5 14:00:20 CEST 2017


Dear Egbert,
After doing the copy-paste of your version of VirtualHost, Apache worked,
but when clicking the link to view the document, I got the message
"Forbidden You do not have permission to access /docs/biblioteca/PDFs/..."
Then I  includ the following lines in the Alias:
    Order allow, deny
    Allow from all
and then it worked properly.

This is my Alias:

Alias /docs/ "/ABCD/www/bases/Arq_digitais/"
 <Directory "/ABCD/www/bases/Arq_digitais/">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
   Order allow,deny
   Allow from all
  Require all granted
 </Directory>

Is that OK?

Thank you very much for your valuable help.

One more question: Can I have more than one Alias in the same VirtualHost?

Arraste e solte o arquivo ou link aqui para traduzir o documento ou a
página da Web.
Arraste e solte o link aqui para traduzir a página da Web.
O tipo de arquivo que você soltou não é suportado. Tente outros tipos de
arquivo.
O tipo de link que você soltou não é suportado. Tente outros tipos de link.
Regards
Edwin

Edwin Hübner
(5521)99647-1675

2017-06-03 6:02 GMT-03:00 De Smet Egbert <egbert.desmet em uantwerpen.be>:

> Edwin,
>
> there are 'non-breaking spaces' at the front of the lines which you have
> added.
> So copy-paste this version for your configuration file :
>
> Listen 9090
>  NameVirtualHost localhost:9090
> <VirtualHost localhost:9090>
> DocumentRoot "C:/ABCD/www/htdocs"
>  ServerName localhost
>  DirectoryIndex index.htm index.php homepage.htm
> <Directory "C:/ABCD/www/htdocs">
>  Options Indexes FollowSymLinks
>  AllowOverride None
>  Order allow,deny
>    Allow from all
>  </Directory>
>
> Alias /docs/ "/ABCD/www/bases/Arq_digitais/"
>  <Directory "/ABCD/www/bases/Arq_digitais/">
>   Options Indexes FollowSymLinks MultiViews
>   AllowOverride None
>   Require all granted
>  </Directory>
>
>  ScriptAlias /cgi-bin/ "C:/ABCD/www/cgi-bin/"
>  <Directory "C:/ABCD/www/cgi-bin">
>  AllowOverride None
>  Options None
>  Order allow,deny
>   Allow from all
>  </Directory>
>  </VirtualHost
>
> Such an alias is needed whenever referring to a file in the URL outside
> the 'DocumentRoot'.
> Guilda's script just 'opens a file' and 'prints' it (with the resp.
> PHP-commands), so she accesses the file without putting it into a URL-call.
> That is how it can work.
>
> By the way, in the demo-configuration file (as delivered with ABCD2.0)
> there is already an alias defined 'docs', referring to the database-folder
> because that is already outside the DocumentRoot (which is htdocs). So if
> you want to refer via a URL to a file in the database-folder, you could
> use, e.g. in a PFT :
> '<A HREF="/docs/dubcore/collection/',v98'" target=new>'v98+|<br>|,'</A>'
> whereas the file is in a collection sub-folder of your database (in this
> case 'dubcore').
> I am trying to avoid using hrdocs/bases for this purpose as was the idea
> in ABCD 1.x because the htdocs-folder should not have any write-access at
> all, but then cannot serve for digital libray functions where end-users
> need to upload (meaning : write) their documents.
>
> Egbert de Smet
> Universiteit Antwerpen
> ------------------------------
> *From:* Edwin Hübner [edwin.hubner em gmail.com]
> *Sent:* Saturday, June 03, 2017 1:01 AM
> *To:* De Smet Egbert
>
> *Subject:* Re: [Isis-users] Arquivo digitais fora do servidor - Digital
> filesoutside the web server
>
> Dear Egbert,
> Turning to the issue of digital files outsite of the server root.
> I thnk your suggestion to include an "Alias" in Apache VirtualHost is a
> good solution. Unfortunately I do not have access to the Apache of the the
> server where I want to implement this solution. So I did a test on my local
> computer (Windows 10), but it's giving an error when starting Apache. I
> have inserted the following into
> /conf/extra/httpd-vhosts-abcd
>
>     Alias /docs/ "/ABCD/www/bases/Arq_digitais/"
>     <Directory "/ABCD/www/bases/Arq_digitais/">
>         Options Indexes FollowSymLinks MultiViews
>         AllowOverride None
>         Require all granted
>     </Directory>
>
> The error it presents is as follows:
> "Invalid command '\ xa0 \ xa0 \ xa0', perhaps misspelled or defined by a
> module not included in the server configuration"
> If I remove the above "Alias" it works
> Any ideas what could be the problem?
> Please, see my VirtualHost Attachement
>
> In fact, according to my first question, I was testing Guilda's solution,
> that is, using "show_image.php" in the pft to present digital files from a
> folder outsite of the server root.
>
> Regards,
> Edwin
>
> Edwin Hübner
> (5521)99647-1675
>
> 2017-05-24 8:40 GMT-03:00 De Smet Egbert <egbert.desmet em uantwerpen.be>:
>
>> Edwin,
>>
>> the link to your document should have a syntax like the following one,
>> taken from the demo-database 'dubcore' :
>> if p(v98) then '<tr><td width=20% valign=top><font face=arial
>> size=2><b>URL</b></td><td valign=top><font face=arial size=2><A
>> HREF="/docs/dubcore/collection/',v98'" target=new>'v98+|<br>|,'</A></td>'
>> fi/ .
>> This displays the link in a table with the name of the field (URL) in the
>> first column and in the second column the actual link is displayed.
>> So the href is :
>> <A HREF="/docs/dubcore/collection/',v98'" target=new>'v98+|<br>|,'</A>
>>
>> Now, the interesting part here is mostly the use of an alias 'docs' which
>> I defined in my Apache configuration :
>>     Alias /docs/ "/var/opt/ABCD/bases/"
>>     <Directory "/var/opt/ABCD/bases/">
>>         Options Indexes FollowSymLinks MultiViews
>>         AllowOverride None
>>         Require all granted
>>     </Directory>
>>
>> So if you understand how Apache now substitutes 'docs' in a URL for a
>> real path (/var/opt/ABCD/bases in this case) you can make the alias point
>> to any folder you want. That then serves as the 'root'. After that root the
>> PFT puts the name of the database (you could also use 'v3000' instead of
>> hard-coding the name 'dubcore') and in the case of dubcore we wanted all
>> PDF's to be in a subfolder 'collection'. Then within that subfolder comes
>> the name of the file, which is put into the field of the record (in this
>> case : v98).
>> Then as general HTML-syntax you close the bracket '>' , then put the
>> visible part of the link which will display in blue as a hyperlink (in this
>> case again : v98) and then you close the anchor (</A>).
>> Analyze what the software has put into the field, because part of the
>> path to the file might already be there, so you don't have to repeat it in
>> the PFT.
>> But the real trick here is in the use of the alias for Apache. The
>> advantage is that then you can have that 'root' directory anywhere on your
>> system, also outside the ABCD directories. This might be handy for
>> management (e.g. backups) of your digital library files.
>>
>> Note : the use of an alias is not necessary but then if not used as is
>> the case for the 'normal' links e.g. used in the demo-database 'biblio'
>> (CEPAL), you have to put the documents inside the Apache DocumentRoot,
>> which is why by default it is in 'htdocs/bases'.
>>
>> I hope this helps.
>>
>> Egbert de Smet
>> Universiteit Antwerpen
>> ------------------------------
>> *From:* isis-users [isis-users-bounces+egbert.desmet=ua.ac.be em iccisis.org]
>> on behalf of Edwin Hübner [edwin.hubner em gmail.com]
>> *Sent:* Wednesday, May 24, 2017 12:32 PM
>> *To:* Ma.Mercedes MacLean
>> *Cc:* isis-users
>> *Subject:* Re: [Isis-users] Arquivo digitais fora do servidor - Digital
>> filesoutside the web server
>>
>> Dear John,
>> I'm already using the full path in dr_path.def. The upload is working
>> well. My problem is with recovery. When I click on the link, it shows a
>> blank screen. I think the problem is with the specification of the path in
>> <a href'...>. Any idea how to properly specify <href?
>> Thanks,
>> Edwin
>>
>>
>> Edwin Hübner
>> (5521)99647-1675
>>
>> Em 23 de maio de 2017 18:35, Ma.Mercedes MacLean <gaspyy60 em gmail.com>
>> escreveu:
>>
>>> Hola Edwin
>>>
>>> Voy a probar, pero creo que solo es un tema de direccionamientos.
>>>
>>> Dame un dia.
>>>
>>> Saludito
>>>
>>>
>>>
>>>
>>>
>>> María Mercedes MacLean
>>>
>>> gaspyy60 em gmail.com
>>>
>>> gaspyy2002 em yahoo.com.ar
>>>
>>> Visite nuestros proyectos
>>>
>>> www.proyectoleonardo.com.ar/proleon
>>>
>>>
>>>
>>>
>>> ------------------------------
>>>
>>> *De:* Edwin Hübner [mailto:edwin.hubner em gmail.com]
>>> *Enviado el:* martes, 23 de mayo de 2017 02:18 p.m.
>>> *Para:* Ma.Mercedes MacLean
>>> *CC:* isis-users
>>> *Asunto:* Re: [Isis-users] Arquivo digitais fora do servidor - Digital
>>> filesoutside the web server
>>>
>>>
>>>
>>> Hola María Mercedes,
>>> Quiero decir fuera de la carpeta /htdocs, donde normalmente se guardan
>>> los archivos digitales. Para mi conveniencia, deseo ponerlos en
>>> /opt/ABCD/www/bases/Arq_digitais y para presentar vía pft usar
>>> "show_image.php" que está en /central/common, pero no presenta,, no
>>> muestra el contenido del documento digital.
>>>
>>> Saludos,
>>>
>>> Edwin
>>>
>>>
>>> Edwin Hübner
>>> (5521)99647-1675
>>>
>>>
>>>
>>> Em 22 de maio de 2017 19:58, Ma.Mercedes MacLean <gaspyy60 em gmail.com>
>>> escreveu:
>>>
>>> Edwin
>>>
>>> A que nte refieres con ver: los archivos digitales *fuera del servidor
>>> web*
>>>
>>> ¿sin Internet? Que quiere decir “fuera…?
>>>
>>> Saludos cordiales,
>>>
>>> María Mercedes MacLean
>>>
>>> gaspyy60 em gmail.com
>>>
>>> gaspyy2002 em yahoo.com.ar
>>>
>>> Visite nuestros proyectos
>>>
>>> www.proyectoleonardo.com.ar/proleon
>>>
>>>
>>>
>>>
>>> ------------------------------
>>>
>>> *De:* isis-users [mailto:isis-users-bounces+gaspyy60=
>>> gmail.com em iccisis.org] *En nombre de *Edwin Hübner
>>> *Enviado el:* lunes, 22 de mayo de 2017 01:52 p.m.
>>> *Para:* isis-users
>>> *Asunto:* [Isis-users] Arquivo digitais fora do servidor - Digital
>>> filesoutside the web server
>>>
>>>
>>>
>>> Prezados,
>>>
>>> Eu gostaria colocar os arquivos digitais em uma pasta fora do servidor.
>>> Criei os seguinte diretório:
>>>
>>> /opt/ABCD/www/bases/Arq_digitais/fgvdoc/
>>>
>>> Debaixo da pasta /fgvdoc, que é o nome da base de dados) criei várias
>>> suabpastas, como /docs, /pdfs, etc.
>>>
>>> Configurei o dr_path.def da seguinte forma:
>>>
>>> ROOT=/opt/ABCD/www/bases/Arq_digitais/fgvdoc/
>>>
>>> Desta forma consigo fazer o upload de arquivos para qualquer subpasta de
>>> /fgvdoc
>>>
>>> No formato de exibição (pft) uso o seguinte comando:
>>>
>>>  '<a href="/central/common/show_image.php?base&fgvdoc/'v505^u'"
>>> target="parent">'...
>>>
>>> O conteúdo de v505^u é o seguinte, por exemplo: docs/manual.pdf
>>>
>>> Problema: Não exibe o arquivo manual.pdf. Apresenta uma página em
>>> branco, sem mensagem de erro.
>>>
>>> Pergunto se alguém está usando esta alternativa e se alguem pode ajudar
>>> para identificar o que está errado ou faltando?
>>>
>>> Desde já agradeço
>>>
>>> ------------------
>>>
>>> Dear,
>>>
>>> I'd like to put the digital files outside the web server.  I created the
>>> following path:
>>>
>>> /opt/ABCD/ ww/bases/Arq_digitais/fgvdoc/
>>>
>>> Under the /fgvdoc folder, (which is the name of the database) I created
>>> several subfolders, such as /docs, /pdfs, etc.
>>>
>>> I configured the dr_path.def as follows:
>>>
>>> ROOT=/opt/ABCD/www/bases/Arq_digitais/fgvdoc/
>>>
>>> This way I can upload files to any subfolder of /fgvdoc
>>>
>>> In the display format (pft) I use the following command:
>>>
>>> '<a href="/central/common/show_image.php?base&fgvdoc/'v505^u'"
>>> target="parent">' ...
>>>
>>> The content of v505\^u is as follows, for example: docs/manual.pdf
>>>
>>> Problem: It does not display the manual.pdf file. It displays a blank
>>> page with no error message.
>>>
>>> I'm asking if anyone is using this alternative and if someone can help
>>> me to identify what is wrong or missing?
>>>
>>> Thank you very much in advance
>>>
>>>
>>>
>>> Edwin Hübner
>>> (5521)99647-1675
>>>
>>>
>>>
>>
>>
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20170605/b5f928af/attachment.html>


More information about the isis-users mailing list