Forum

Thread tagged as: Question

Apache virtualhost configuration

Hello,

I've been reading the guide:

https://docs.grabaperch.com/perch/building/servers/installing-a-local-server-with-xampp/

however I believe it applies (more) to XAMPP whereas I am using AMPPS, and have the following in my httpd-vhosts.conf file:

<VirtualHost examplehost.local:80>
<Directory "C:/Program Files (x86)/Ampps/www/examplehost"></Directory> 
DocumentRoot "C:/Program Files (x86)/Ampps/www/examplehost"
</VirtualHost>

so while this works when using https://examplehost.local if I use https://localhost/examplehost as per the folder name it brings up errors, e.g.

Warning: include(C:/Program Files (x86)/Ampps/www/perch/runtime.php): failed to open stream

so I was wondering if anyone could tell me how to block access to the directory, unless that is more oriented towards apache in general.

Thanks for any help, pointers or assistance.

Garth Holmes

Garth Holmes 0 points

  • 4 years ago

There is an option in AMPPS to add virtual hosts, but there is still the issue of being able to access the directory from localhost however I understand if there is no information forthcoming in this instance.

Drew McLellan

Drew McLellan 2638 points
Perch Support

You might have more luck somewhere like StackOverflow.

AMPPS actually has a configurator onboard so you only need to edit the hosts.txt file.