Virtual host not working. Redirects to dashboard

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Virtual host not working. Redirects to dashboard

Postby luismartin » 22. June 2017 20:40

I'm having problems setting up a local website. Despite the corresponding virtual host is defined, something seems to point to the document root directory, then to the dashboard.

This is the part of my httpd.conf which includes the virtual hosts config:

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


httpd-vhosts.conf, without comments:

Code: Select all
<VirtualHost *:80>
    ServerAdmin me@gmail.com
    DocumentRoot "/opt/lampp/htdocs/mysite"
    ServerName mysite.dev
    ServerAlias www.mysite.dev
    ErrorLog "logs/mysite.dev-error_log"
    CustomLog "logs/mysite.dev-access_log" common
</VirtualHost>


And the /etc/hosts file:
Code: Select all
127.0.0.1   localhost
127.0.1.1   my-pc

#XAMPP
127.0.0.1  mysite.dev www.mysite.dev

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


I already managed to deactivate the redirection to the dashboard, and now when I try to enter mysite.dev or http://www.mysite.dev, the document root files are indexed. It doesn't matter to me if they're indexed here, what I want is to serve from /opt/lampp/htdocs/mysite

I can reach this directory if i instead enter http://localhost/mysite, but this is not what I want. Plus I restarted Apache everytime I made any change.

Any help?
luismartin
 
Posts: 16
Joined: 10. September 2011 10:05

Re: Virtual host not working. Redirects to dashboard

Postby Nobbie » 22. June 2017 22:54

What is with the error_log? Also try to run "/opt/lampp/bin/httpd -S" in a terminal, what does it tell about your VirtualHosts?
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 21 guests