- Code: Select all
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs"
ServerName localhost
ServerAlias localhost
ErrorLog "D:/xampp/Logs/localhost-error.log"
CustomLog "D:/xampp/Logs/localhost-access.log" common
<Directory "D:/xampp/htdocs/">
AllowOverride All
Require local
Require ip 192.168.188
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/WEBDEV/WWW"
ServerName workbench.webdev
ServerAlias www.workbench.webdev
ErrorLog "D:/WEBDEV/WWW/Logs/workbench-apache.error.log"
CustomLog "D:/WEBDEV/WWW/Logs/workbench-apache.access.log" common
<Directory "D:/WEBDEV/WWW">
AllowOverride all
Options Indexes FollowSymLinks
<IfDefine APACHE24>
Require local
Require ip 192.168.188
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from 127.0.0.0/8 localhost ::1 192.168.188
</IfDefine>
</Directory>
# E_ALL & ~E_STRICT
php_admin_value error_reporting 30719
php_value max_execution_time 180
php_value memory_limit 128M
php_value post_max_size 32M
php_value max_upload_size 50M
php_value upload_max_filesize 32M
php_flag display_errors off
php_flag log_errors on
php_value error_log "D:/WEBDEV/WWW/Logs/workbench-php.error.log"
</VirtualHost>
With above virtual host entries I can access localhost just fine. The default XAMPP page comes up and things are running smoothly.
Logs are being logged for localhost and I am happy.
Though for my work directory I get error 403.
Reading this post https://community.apachefriends.org/f/viewtopic.php?f=17&t=71294&p=244070&hilit=virtual+host+403#p244070 I changed httpd.conf line 188 and 189 from User Deamon and Group Deamon to User [userame of the Windows account I log into the system] and same for Group.
Though that does not change the 403 error.
Is that the error?
Another thing is that under D:/WEBDEV/WWW/ I do not have an index.html or index.php file but many folders with my various work projects.
Ideally I like to see those folders (FollowSymLinks) in the browser and when I click on one of the folders, THEN inside each one of those I have an index.html or an index.php file and THEN the project in question should come up in the browser under the URL workbench.webdev/[projectfolder]/.
If not having an index. file in D:/WEBDEV/WWW/ causes this please let me know how I can tell Apache to NOT look for an index. file in D:/WEBDEV/WWW/ but actually follow the links in that folder with the FollowSymLinks command, thank you.
Win HOSTS file does have the entry 127.0.0.1 workbench.webdev.
To restrict access to the local network only I have set require rules for the localhost IP 127.0.0.1 as well as for the IP range that my router dishes out to local clients.
I fear that
- Code: Select all
<IfDefine APACHE24>
might be causing issues here.
If you find a bit of time to look into this please let me know what I can change.
The logs for my workbench already appear in the D:\WEBDEV\WWW\Logs directory, so that works fine also.
error.log
- Code: Select all
[Sat Aug 08] [authz_core:error] [pid 7396:tid 2016] [client 127.0.0.1:63407] AH01630: client denied by server configuration: D:/WEBDEV/WWW/
access.log
- Code: Select all
127.0.0.1 - - [08/Aug/] "GET / HTTP/1.1" 403 1062
Thank you for your help.