-1

i defined

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot "/home/andrei06041990/sites/cosmeticremix"
    ServerName cosmeticremix.dev
    ServerAlias www.cosmeticremix.dev
    <Directory "/home/andrei06041990/sites/cosmeticremix">
        Options Indexes FollowSymLinks
        #AllowOverride All
        AllowOverride None
        Require all Granted
    </Directory>
</VirtualHost>

at the end of the /etc/httpd/conf/httpd.conf file but when i access http://www.cosmeticremix.dev/ in browser i end up with the default page of the apache server how are virtual hosts defined?

1 Answers1

0

You have to mention Directive options in your httpd.conf file. Apache (httpd.conf), search for DirectoryIndex and replace the line with this #Note: will only work if you have dir_module enabled, but that's default on most installs.

DirectoryIndex index.php

If you use other directory indexes, list them in order of preference i.e.

DirectoryIndex index.php index.phtml index.html index.htm
Alex
  • 172
  • 1
  • 1
  • 8