Unable to access the files outside wamp64 installation folder
Posted by: TejuKolli (59.90.227.---)
Date: July 24, 2019 07:27AM

Hi

I'm trying to access the pdf files outside the wamp installation folder, where i got 404 error

I've tried something like


<a href="D:/hello/hello.pdf">hello</a>


Could you please help me with this.


Thanks in advance.



Edited 1 time(s). Last edit at 07/24/2019 11:22AM by RiggsFolly.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: Otomatic (Moderator)
Date: July 24, 2019 10:03AM

Hi,

See Apache documentation [httpd.apache.org]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 07/24/2019 10:24AM by Otomatic.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: TejuKolli (59.90.227.---)
Date: July 24, 2019 11:10AM

Hi

I really could not understand how this gonna really help me!!


My query is to know how can i access path outside wamp installation folder

As by default the hyperlinks are looking for the path inside "www", hence saying resource not found.

I want to access someother pdf files which i don't want to include in www folder, but wanted them access on clicks.

So my question is, how can i add that path so that wamp will also know it, along with www.

Thank you.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: RiggsFolly (Moderator)
Date: July 24, 2019 11:27AM

The link Oto gave you is to the Apache Manual.
ALL KNOWLEDGE ABOUT APACHE is in the manual.IF YOU READ IT !!

He even saved you the time of finding the relevant page.
I am giving you the section of that page that you definitely need to read AND UNDERSTAND

-> Files Outside the DocumentRoot

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: TejuKolli (59.90.227.---)
Date: July 24, 2019 12:20PM

Thank you after

After reading the document i tried to write below lines quoted in httpd.conf file


"" Alias "/docs" "E:/"
<Directory "E:/">

Options +Indexes +FollowSymLinks +MultiViews
AllowOverride all
Order Allow,Deny
Allow from all

</Directory> ""

Where i want access files from the E dirve.



Now i restarted services in wamp but it didn't go green, remained orange!!


Could you please help me with this.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: RiggsFolly (Moderator)
Date: July 24, 2019 12:23PM

SHow us where you put those statements.
Show the whole relevant section of the file you changed.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 07/24/2019 12:23PM by RiggsFolly.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: TejuKolli (59.90.227.---)
Date: July 24, 2019 12:55PM

Yeah sure i've tried add those lines

in httpd.conf file. After

Include "${INSTALL_DIR}/alias/*"


Alias "/userdocs" "E:/"
<Directory "E:/">
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>



Edited 1 time(s). Last edit at 07/24/2019 02:30PM by RiggsFolly.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: Otomatic (Moderator)
Date: July 24, 2019 01:25PM

Hi,

> Order Allow,Deny
> Allow from all
It is for Apache 2.2, not for Apache 2.4

There are examples of alias (PhpMyAdmin, Adminer, PhpSysInfo) in wamp/alias/ folder

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: TejuKolli (59.90.227.---)
Date: July 24, 2019 02:13PM

Thank you


Similar to phpmyadmin.conf i changed the httpd.conf as follows


Alias /userdocs  "E:/"

<Directory "E:/">

    Options +Indexes +FollowSymLinks +Multiviews
    AllowOverride all
    <ifDefine APACHE24>
        Require local
    </ifDefine>

    <ifDefine !APACHE24>
        Order Deny, Allow
        Deny from none
        Allow from ip 12.18.4
    </ifDefine>
</Directory>


After that restarted wamp services still it didn,t go green



Edited 2 time(s). Last edit at 07/24/2019 02:31PM by RiggsFolly.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: Otomatic (Moderator)
Date: July 24, 2019 02:23PM

Hi,

Sometimes you have to think about the integrated tools of Wampserver, for example:

Right-click -> Tools -> Check httpd.conf syntax

and, look, there are others.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: Otomatic (Moderator)
Date: July 24, 2019 03:00PM

Hi,

Here is a method that works perfectly, but you can do it differently and declare the alias somewhere else.

File wamp(64)/alias/userdocs.conf
Alias /userdocs "F:/userdocs/"

<Directory "F:/userdocs/">
  Options Indexes FollowSymLinks
  AllowOverride all
  Require local
</Directory>

Into the F:/userdocs/ folder there is a file attention.pdf.

In your VirtualHost code :
<a href='userdocs/attention.pdf'>Hello</a>

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: TejuKolli (59.90.227.---)
Date: July 25, 2019 07:08AM

Hi


Sorry to trouble you again

i've tried

Alias /docs "E:/"

<Directory "E:/">

  Options Indexes FollowSymLinks

 AllowOverride all

  Require local

Require ip 12.18.4

</Directory>

where saving these lines in docs.conf file in wamp(64)/alias/

I have added the below hyperlink in index.html file in my project folder

<a href="docs/hello.pdf">Hello</a>, where hello.pdf is in E:/


Now i tried to run the local host as


[12.18.4.1]


When i'm clicking on that hyperlink i could see the following error

404 Not found

The requested url of the projectfolder/docs/hello.pdf was not found on the server.



Edited 1 time(s). Last edit at 07/25/2019 10:08AM by RiggsFolly.

Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: RiggsFolly (Moderator)
Date: July 25, 2019 10:09AM


Options: ReplyQuote
Re: Unable to access the files outside wamp64 installation folder
Posted by: TejuKolli (59.90.227.---)
Date: July 26, 2019 06:20AM

Hi


Thank you so much !! It helped me alot !!

Options: ReplyQuote


Sorry, only registered users may post in this forum.