VirtualHost defined, but always get directed to /dashboard

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

VirtualHost defined, but always get directed to /dashboard

Postby zwalex » 20. March 2018 02:16

I am running XAMPP 7.2.3 on OS X 10.11.6.
I installed bitnami's wordpress module and everything is working fine.
I can access my wordpress installation via my-machine-name/wordpress.
I set up a Virtualhost in an included httpd-vhost.conf file that looks like this:
Code: Select all
<VirtualHost *:80>
       DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/"
       ServerName localhost
</VirtualHost>

<VirtualHost *:80>
       DocumentRoot "/Applications/XAMPP/xamppfiles/apps/wordpress/htdocs"
       ServerName wordpress.local
</VirtualHost>

I am confident that this configuration is used, as when I run /Applications/XAMPP/xamppfiles/bin/httpd -S, the first few lines show:
Code: Select all
VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server localhost (/Applications/XAMPP/xamppfiles/apps/wordpress/conf/httpd-vhosts.conf:1)
         port 80 namevhost localhost (/Applications/XAMPP/xamppfiles/apps/wordpress/conf/httpd-vhosts.conf:1)
         port 80 namevhost wordpress.local (/Applications/XAMPP/xamppfiles/apps/wordpress/conf/httpd-vhosts.conf:6)

I added the following line to my /etc/hosts file:
Code: Select all
127.0.0.1       wordpress.local

when I type in wordpress.local in my browser, I get redirected to wordpress.local/dashboard.

What am I missing?
Thanks!

[I can still get to my WordPress installation via wordpress.local/wordpress (or locahost/wordpress]
zwalex
 
Posts: 1
Joined: 20. March 2018 02:02
XAMPP version: 7.2.3
Operating System: 10.11.6

Re: VirtualHost defined, but always get directed to /dashboa

Postby franyozef » 11. June 2018 14:18

I had the same problem ..

Open httpd.conf
check at

Code: Select all
# Virtual hosts
Include etc/extra/httpd-vhosts.conf


As I recalled, that line was commented out, so the vhost file was never loaded
franyozef
 
Posts: 3
Joined: 11. June 2018 14:00
XAMPP version: 7.2.5
Operating System: OSx

Re: VirtualHost defined, but always get directed to /dashboa

Postby Nobbie » 12. June 2018 09:43

zwalex wrote:What am I missing?


Clear the cache of the browser, i.e. force a refresh (ctrl. f5)
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 77 guests