Cant view images stored in virrtual directory
Posted by: Kushtakaa (---.vm5.cable.virginm.net)
Date: April 16, 2023 03:55PM

I have a folder setup in c:\Wamp64\ called astronomy and can access locally using <img src="/astronomy/gemini.jpg"> however other computers/tablets on the network are not showing the images. I have the alias directory setup like this

Alias /astronomy "C:/wamp64/_astronomy/"
<Directory "C:/wamp64/_astronomy/">
Options +Indexes +FollowSymLinks +MultiViews
Order allow,deny
Allow from all
</Directory>

Is there a problem here? the rest of the page is served up perfectly

Options: ReplyQuote
Re: Cant view images stored in virrtual directory
Posted by: Otomatic (Moderator)
Date: April 16, 2023 05:29PM

> Order allow,deny
> Allow from all

It is for Apache 2.2 !!!!

Apache 2.4 use Require. See Apache documentation.

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

Options: ReplyQuote
Re: Cant view images stored in virrtual directory
Posted by: webmasterinnj (---.cmdnnj.fios.verizon.net)
Date: April 16, 2023 07:11PM

Alias /astronomy "C:/wamp64/_astronomy/"
<Directory "C:/wamp64/_astronomy/">
Options +Indexes +FollowSymLinks +MultiViews
Order allow,deny
Allow from all
</Directory>
------------------------------------------------------------------------------------------------
change to
Alias /astronomy "C:/wamp64/_astronomy/"
<Directory "C:/wamp64/_astronomy/">
Options +Indexes +FollowSymLinks +MultiViews
Order allow,deny
require all granted
</Directory>
------------------------------------------------------------------------------------------------
then restart webserver.

[djswebserver.ddnsgeek.com]

Options: ReplyQuote
Re: Cant view images stored in virrtual directory
Posted by: RiggsFolly (Moderator)
Date: April 17, 2023 04:23PM

webmasterinnj,

Please be careful when answering peoples questions! There is more to it than just getting your website link on lots of pages.


Order allow,deny
Is Apache 2.2 syntax

require all granted
Is Apache 2.4 syntax.

These 2 have nothing to do with each other.
Using the 2 together will only cause Apache confusion and can in some cases cause actual issues. I suggest from now on, in fact for some time now, that you stick to Apache 2.4 syntax.

Apache 2.4 Syntax Doc

The Apache 2.2 syntax only actually works in Apache 2.4 because this Apache module is loaded.
LoadModule access_compat_module modules/mod_access_compat.so

This has been the case since Apache 2.4 was released and was intended to allow us all time to move to the Apache 2.4 syntax without breaking millions of web sites as of day 1.
I would guess that at some point in the future that module will get removed/deprecated from the default httpd.conf file making only the valid Apache 2.4 syntax work.

You also need to be careful suggesting the use of `Require all Granted` as that gives access to the Universe. In this question the OP was interested in giving access to other computers/devices within their own network ONLY. So a much better solution would have been to suggest the use of a less dangerous configuration of

Require IP 192.168.0

This assumes of course that the OP's network is the usual SOHO router subnet and will give access to only that subnet. i.e. any ip address starting with `192.168.0`

---------------------------------------------------------------------------------------------
(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 3 time(s). Last edit at 04/17/2023 06:04PM by RiggsFolly.

Options: ReplyQuote
Re: Cant view images stored in virrtual directory
Posted by: Otomatic (Moderator)
Date: April 17, 2023 05:17PM

Hi,

> I would guess that at some point in the future that module will get removed/deprecated from
> the default httpd.conf file making only the valid Apache 2.4 syntax work.

Starting with the next Apache release (2.4.57.2 or 2.4.58) the access_compat_module will not be loaded by default.

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

Options: ReplyQuote
Re: Cant view images stored in virrtual directory
Posted by: RiggsFolly (Moderator)
Date: April 17, 2023 05:44PM

Thanks Oto,

Sooner than I thought.

---------------------------------------------------------------------------------------------
(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


Sorry, only registered users may post in this forum.