Funny Frontend
Funny Frontend

Reputation: 3925

XAMPP Apache redirect my virtualhost to /dashboard

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

Answers (3)

Ani
Ani

Reputation: 561

I got the same problem also other sequential issues.

How I solved: First thing first,

  1. You should change User permission which is daemon as standard. Change it to your username. You can see your name on terminal username@...

/Applications/XAMPP/etc/httpd.conf

From:

User daemon
Group daemon

To

User username
Group daemon
  1. Uncomment vhost line if you add virtual hosts to this vhost configuration.

/Applications/XAMPP/etc/httpd.conf

#Virtual hosts
Include etc/extra/httpd-vhosts.conf
  1. (Optional) If your files are not located on htdocs you will probably get same problem with me. I am adding my folder which will contain my all projects on there as allowed folder.

/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

Hanson
Hanson

Reputation: 9

The solution is to just restart apache under the XAMPP control panel.

Upvotes: 0

Funny Frontend
Funny Frontend

Reputation: 3925

The solution is uncomment this module in the file httpd.conf:

# Virtual hosts
Include etc/extra/httpd-vhosts.conf

Upvotes: 19

Related Questions