Page 1 of 1

Xampp virtual hosts

PostPosted: 25. July 2018 14:09
by torierja
Hello,

I have setup virtual host in Xampp 3.2.2 on Windows 10 version 1803.
I have added hosts to windows like this:
127.0.0.1 portal.local

I have added the virtual host to httpd-vhosts.conf like this:

<VirtualHost *:80>
DocumentRoot "E:/dashboard/portal"
ServerName portal.local
<Directory "E:/dashboard/portal">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

and have uncommented this sentence:
NameVirtualHost *:80

Now when i go to portal.local it sends me to the document root from the httpd.conf file (The xampp dashboard page).
I want it to go to my folder.
How can i do this?

Thanks

Re: Xampp virtual hosts

PostPosted: 25. July 2018 21:06
by Nobbie
Did you remove the comment # in httpd.conf in front of the include, which includes httpd-vhosts.conf?

Re: Xampp virtual hosts

PostPosted: 26. July 2018 06:56
by Altrea
The NameVirtualHost *:80 line is not used anymore. You can simply remove this.

The lines
Order allow,deny
Allow from all

was replaced in Apache 2.4 with the Directive Require all granted

I would not recommend to nest virtual hosts. The dashboard folder is not recommend to save your own projects in.

Last not least you need to restart Apache after all changes in the Apache config files.