简体   繁体   中英

Virtual Host directs me to Xampp dashboard

I am trying to run my website on different devices.

I have this in my httpd-vhosts.confiq

NameVirtualHost *:80

<VirtualHost VirtualHost 127.0.0.1:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "C:/xampp/htdocs/"
    ServerName mywebsite.com
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

I have uncommented out the hash's that were in the file before changing them.

in my hosts files:

192.168.56.1           mywebsite.com

My website folder is like so:

Mywebsite
    - Home
        -about 
        -blog
        -profile
    - index.php
    - login
        -login.php
    - connections
        -connections.php

so these are the folders with some of the files inside.

Now when i restart apache and type the following:

http://mywebsite.com

it directs me to http://mywebsite.com/dashboard which is just a xampp webpage.

Why does this occur?

Thanks.

Without the full configution I can only guess but I suggest you to start changing

<VirtualHost VirtualHost 127.0.0.1:80>

to

<VirtualHost *:80>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM