Reputation: 2226
WAMP 32 running on Windows 10 machine, with Apache server (2.4) set "Online". Acces from other LAN computers is possible, however when attempting to access the server from the Internet (using public IP number), an error 403/forbidden is issued.
Happens with the following configuration (vhosts):
NameVirtualHost *
<VirtualHost *>
DocumentRoot "E:\Users\Rix\Offline Drive\wordpress"
ServerName localhost
<Directory "E:\Users\Rix\Offline Drive\wordpress">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *>
DocumentRoot "E:\Users\Rix\Offline Drive\WebG\Wordpress"
ServerName ghiandalocal
<Directory "E:\Users\Rix\Offline Drive\WebG\Wordpress">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
BTW, in vhosts there are 2 servers available, how can I access a specific one using a public IP?
Upvotes: 0
Views: 1891
Reputation: 325
About the 403 error you should add : Require all granted
for your directories.
About the 2 servers availables, you can add for example another port like :
Listen 80
Listen 81
<VirtualHost *:80>
DocumentRoot "E:\Users\Rix\Google Drive\Documents\Biz\Progetti\wordpress"
ServerName localhost
<Directory "E:\Users\Rix\Google Drive\Documents\Biz\Progetti\wordpress">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:81>
DocumentRoot "E:\Users\Rix\Offline Drive\Web Ghianda\Wordpress"
ServerName ghiandalocal
<Directory "E:\Users\Rix\Offline Drive\Web Ghianda\Wordpress">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Hope it helps you
Upvotes: 1