Reputation: 3925
I config my apache hostname and virtualhost in XAMPP on Mac.
But, when I access to host url, xampp redirects me to /dashboard: mydomain.dev/dashboard
This is my httpd-vhosts.conf:
# Virtual Hosts
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/web_frikinow/public"
ServerName mydomain.dev
</VirtualHost>
And this is my /etc/hosts file:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 mydomain.dev
127.0.0.1 Funny-Frontend # added by Apache Friends XAMPP
Whats is the problem?
Upvotes: 12
Views: 14963
Reputation: 561
I got the same problem also other sequential issues.
How I solved: First thing first,
/Applications/XAMPP/etc/httpd.conf
From:
User daemon
Group daemon
To
User username
Group daemon
/Applications/XAMPP/etc/httpd.conf
#Virtual hosts
Include etc/extra/httpd-vhosts.conf
/Applications/XAMPP/etc/httpd.conf
Add this line
<Directory "/Users/username/foldername">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/trunk/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks
# XAMPP
Options Indexes FollowSymLinks ExecCGI Includes
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
#AllowOverride None
# since XAMPP 1.4:
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
Save it and restart the apache web server on XAMPP. For 3rd option, there are other solutions also which can help you.
Upvotes: 0
Reputation: 3925
The solution is uncomment this module in the file httpd.conf:
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
Upvotes: 19