How to grant access to a specific folder for a specific IP?
Posted by: HolyMoly (---.sitbs.at)
Date: May 03, 2023 12:49PM

Hi,

we have a public domain for an onlineshop with prestashop, I need someone
to check some files from the outside.
How can I grant access to a specific folder for a specific IP?

That is the host cfg, without the SSL specifications (but they are included).

'<VirtualHost *:443>
ServerName www.domain.com
ServerAlias domain.com


DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
AllowOverride All
#Require all granted
Require local
Require ip x.x.x.x
Options +Includes +FollowSymLinks
</Directory>
</VirtualHost>'

DocumentRoot and Directory has to be different and Require too. But do I need a new host?
Can both co-exist with the same ServerName?

Options: ReplyQuote
Re: How to grant access to a specific folder for a specific IP?
Posted by: Otomatic (Moderator)
Date: May 03, 2023 01:38PM

Hi,

Inside or outside the <VirtualHost *:443>...</VirtualHost> structure you add a <Directory ...>...</Directory> structure for the specific folder with a Require ip directive on the specific ip.

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

Options: ReplyQuote


Sorry, only registered users may post in this forum.