Hi, I'm new to WAMP and struggling a bit with virtual hosts.
I want a publically available server, with two websites and a cms installed on each, one being the main domain and the other being a subdomain.
The problem is I'm not sure how to set this up in the virtual server config, I have tried various ways and guides but always block access to one, or the other.
using the following config data:
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp64/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www/daktadomain"
ServerName daktadomain.com
<Directory "c:/wamp64/www/daktadomain">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
This allows me to connect to the admin console locally, and view the website properly on the internet from other computers, but if I try to add the subdomain as follows:
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp64/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www/daktadomain"
ServerName daktadomain.com
<Directory "c:/wamp64/www/daktadomain">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www/daktasubdomain"
ServerName subdomain.daktadomain.com
<Directory "c:/wamp64/www/daktasubdomain">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
The subdomain returns 403 forbidden, I appreciate I'm probably making a rookie mistake here but any ideas?
I want a publically available server, with two websites and a cms installed on each, one being the main domain and the other being a subdomain.
The problem is I'm not sure how to set this up in the virtual server config, I have tried various ways and guides but always block access to one, or the other.
using the following config data:
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp64/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www/daktadomain"
ServerName daktadomain.com
<Directory "c:/wamp64/www/daktadomain">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
This allows me to connect to the admin console locally, and view the website properly on the internet from other computers, but if I try to add the subdomain as follows:
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp64/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www/daktadomain"
ServerName daktadomain.com
<Directory "c:/wamp64/www/daktadomain">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp64/www/daktasubdomain"
ServerName subdomain.daktadomain.com
<Directory "c:/wamp64/www/daktasubdomain">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
The subdomain returns 403 forbidden, I appreciate I'm probably making a rookie mistake here but any ideas?