Reputation: 25645
I've
/var/www/app.mydomain.com
This contain only on index.html
with
<h1>I want it works ... please</h1>
This is my /etc/apache2/sites-enabled/app-mydomain-com.conf
<VirtualHost *:80>
ServerName app.mydomain.com
ServerAdmin [email protected]
DocumentRoot /var/www/app.mydomain.com
CustomLog ${APACHE_LOG_DIR}/vhosts/app-mydomain-com/access.log vhost_combined
ErrorLog ${APACHE_LOG_DIR}/vhosts/app-mydomain-com/error.log
</VirtualHost>
When I open browser at app.mydomain.com I got a forbidden from apache
In the error.log (the main error.log, NOT the one specific of my vhost) I got
Cannot serve directory /var/www/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php, index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
I totally have no idea of what does it mean in my case
I tried to add
DirectoryIndex index.html
But nothing changes (after a restart of apache2, of course)
I verified that site was enabled
a2ensite app-mydomain-com
Site app-mydomain-com already enabled
Upvotes: 0
Views: 192
Reputation: 25645
At the end, the problem was only a missing ServerAlias
directive.
Upvotes: 0