0

OS: Mac OS Mamp 6.6 version

The virtual host is not working, when I open the host I get an error:

Not Found The requested URL was not found on this server.

looked at a lot of articles on topic of installing virtual hosts and it seems that I did everything right

My hosts file: enter image description here

The virtual hosts file is included in configuration file /Applications/MAMP/conf/apache/httpd.conf:

# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

My httpd-vhost-conf:

NameVirtualHost *:80

<VirtualHost *>
    ServerName localhost
    DirectoryIndex index.html index.htm index.php
    DocumentRoot "/Users/danilbondarev/Projects/php"
    <Directory "/Users/danilbondarev/Projects/php">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Order Allow,Deny
        Allow From All
    </Directory>
</VirtualHost>

<VirtualHost *>
    ServerName localhost
    DirectoryIndex index.html index.htm index.php
    DocumentRoot "/Users/danilbondarev/Projects/php/hybrid-main"
    <Directory "/Users/danilbondarev/Projects/php/hybrid-main">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Order Allow,Deny
        Allow From All
    </Directory>
</VirtualHost>

Mamp->Preferences->Server->Document Root: enter image description here

Error screen: enter image description here

I want to note: I always restart apache and MAMP when I make any changes to the config files. I also tried to give directories permissions for Apache and it didn't help, although obviously this wasn't the problem

Tried these solutions: Virtual hosts not working on MAMP MAMP setting virtual host does not working

4efirrr
  • 231
  • 1
  • 5

0 Answers0