Hello. I am Running a multitenancy app locally and am unable to get the subdomains to work. I am using the tenancy package from tenancy.dev. I can get the pretty url to work just fine (tenancy.test) but if I try to hit the demo.tenancy.test, the system cannot find it. In my Host file (in windows sys32 ...) I have added:
127.0.0.1 demo.tenancy.com
127.0.0.1 tenancy.com
and in my httpd.conf file in apache, I have uncommented the line:
LoadModule vhost_alias_module modules/mod_vhost_alias.so
And in my httpd-vhosts.conf, I have:
UseCanonicalName Off
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/tenancy"
ServerName tenancy.test
</VirtualHost>
<VirtualHost *:80>
ServerAlias *.tenancy.test
VirtualDocumentRoot "C:/xampp/htdocs/%1/tenancy"
</VirtualHost>
and have also tried:
<VirtualHost *:80>
DocumentRoot "C/laragon/www/tenancy/public/"
ServerName tenancy.test
<Directory "/laragon/www/tenancy">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/tenancy-error.log
CustomLog ${APACHE_LOG_DIR}/tenancy-access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =peretch.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
and
<VirtualHost *:80>
ServerAdmin erik@rrspark.com
ServerName tenancy.test
DocumentRoot /xampp/htdocs/tenancy/public
<Directory "/xampp/htdocs/tenancy">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =peretch.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Any sugesstions would be greatly appreciated. Thank you