Score:0

Apache2 Creating index.html file instead of following DocumentRoot

ca flag

apache2 will not follow the document root. Instead it creates an index.html file in var/www/ every time I goto store.test

apache.conf

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

000-default.conf

<VirtualHost 0.0.0.0:80>
    ServerAdmin webmaster@localhost
    ServerName store.test
    ServerAlias store.test
    DocumentRoot /var/www/hub-store/web
    DirectoryIndex index.php

  <Directory "/var/www/hub-store/web">
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Require all granted
    </Directory>
</VirtualHost>

Really have no idea why For my sanity hub-store is 755 all and owner group is www-data for all

Still write html files to /var/www/ dir

WHY?

in flag
In my 20+ years of using Apache, I have never seen it create a file. Have you ruled out the PHP system in `hub-store/web` creating it?
ca flag
I've never seen it happen too. There is no index.html file in hub-store/web only index.php and I'm telling it to load that. Wonder if php isn't running it so it creates a index.html file.
in flag
What is the content of the `.html` file that's created? Is it the default Ubuntu Apache page saying "It works" or something like that? Or is it something a little more application-specific?
ca flag
it's blank, empty file.
ca flag
Making some progress. I enabled ssl ( i guess it was dissabled ) but now its creating the index.html file in my web dir even though DocumentIndex is set to index.php
in flag
Are there any other config files that are active that may be interfering with the target site? Check in `/etc/apache2/sites-enabled`. In your VHost config, you could replace `0.0.0.0:{port}` with `*:{port}`, but this shouldn’t be causing issues.
ca flag
i'm at a loss then I try to curl to it from the same machine it still gives me a blank page not results... I'm loosing my mind.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.