Hi I have browsed all the resources, but still seems can’t find the solution.
I have XAMPP Control Panel v 3.2.4 (compiled Jun 5th 2019) installed on my computer, it is installed in d:xampp. I want to create a Virtual host, so that I can correctly use various global PATH variables.
I followed instructions closely.
This is from my D:xamppapacheconfextrahttpd-vhosts.conf:
<VirtualHost *:80>
ServerName localhost
DocumentRoot "D:xampphtdocs"
<Directory "D:xampphtdocs">
DirectoryIndex index.php
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName ikeen.localhost
DocumentRoot "D:xampphtdocsikeen"
SetEnv APPLICATION_ENV "development"
<Directory "D:xampphtdocsikeen">
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I have added following lines to the end of httpd.conf:
<Directory />
AllowOverride none
Require all granted
</Directory>
I have the following line in my hosts file in windows:
127.0.0.1 ikeen.localhost
This is the structure of my site directory
In order to avoid cache I open URL in the incognito mode and from different browsers. I always get redirect to dashboard – https://ikeen.localhost/dashboard/, it opens the standard “Welcome to XAMPP for Windows 7.4.3”
I have heard that it has something to do with https, as I’m always transferred to https URL even if I try to use http. I’ve looked at httpd-ssl.conf, but I don’t know what to do there. Any ideas?
3
Answers
Finally! For everyone who is looking for the solution do the following:
My desired site is located at D:xampphtdocsikeen.
1) Add this to your httpd-vhosts.conf:
2) Add this to the end of httpd.conf:
3) Add this line to your hosts file in Windows directory
4) Finally, this is the step that is missing from all the solutions. Add this to your httpd-ssl.conf, after the same section for your localhost (usually www.example.com), change example.com to your local settings for localhost, so that the whole section looks smth like this
I had the same issue. Problem was solved by removing the standard virtual host entry and i wasn’t redirected to the root directory.
Just remove these lines of code:
If the case does not work, maybe change httpd-ssl.conf
My 3 sites worked, localhost, test1.com, test2.com