Virtual host cannot create XAMPP server

I am adding the following codes to the httpd-vhost.conf file.

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/mmcast"
ServerName mmcast.dev
 <Directory  "C:/xampp/htdocs/mmcast">
    AllowOverride All
    Require all granted
 </Directory>

Although I can run Apache and MySQL in XAMPP, but I cannot name my vhost.
I got a "Connect failed" message when I call mmcast.dev in a browser.

Do I need to change <VirtualHost *:80>to 81? Because I'm modifying Listen 81 in the httpd file. But I tried to change 80 to 81, but it still does not work.

In the httpd.conf file I am changing like this, but this does not work.

<Directory />
AllowOverride all
Require all granted
</Directory>

In the hosts file

127.0.0.1       mmcast.dev

It only works http://localhost:81/mmcast/. Can anybody help me?

0
1

, hosts -

127.0.0.1   mmcast.dev

-, httpd.conf - < directory Require all granted

-, httpd-vhost.conf

# you can put any port whatever you feel comfortable! I normally use 127.0.0.1:144 and counting for every project
Listen 127.0.0.1:81 
<VirtualHost 127.0.0.1:81>
    ServerName mmcast.dev
    DocumentRoot "C:\xampp\htdocs\mmcast"
    SetEnv APPLICATION_ENV "development"
    <Directory "C:\xampp\htdocs\mmcast">
         DirectoryIndex index.php
         AllowOverride All
         Order allow,deny
         Allow from all
    </Directory>
</VirtualHost>  

-, RESTART XAMPP. https://127.0.0.1:81

0

All Articles