2
I’m trying to install Magento on my localhost using virtual host (so it can work) but even I’ve already created the file on /etc/apache2/sites-available
with the name magento.conf
with the code:
<VirtualHost *:80>
DocumentRoot /var/www/magento
<Directory /var/www/magento/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
In case I try to access http://magento.localhost
apache page is normally loaded Apache2 Ubuntu Default Page
and the folder files do not open so I can start the installation of the user.
Does anyone have any idea what might be going on?
<VirtualHost *:80>
 DocumentRoot “/var/www/magento”
 ServerName magento.localhost
 ServerAlias magento.localhost
 ErrorLog “/var/log/apache2/virtual-error.log”
 CustomLog “/var/log/apache2/virtual-custom.log” common
 
 <Directory “/var/www/magento/”>
 Options Includes FollowSymLinks
 AllowOverride All
 Order allow,deny
 Allow from all
 </Directory>
</VirtualHost>
thus?– RFL
The
ServerAlias
is unnecessary because you are creating an alias equal to the server name (but I think this is no problem). Be sure to check if the parameterNameVirtualHost
is configured correctly. Otherwise, it seems to be correct yes, considering that all paths are valid.– Vinícius Gobbo A. de Oliveira
I made some changes here and now the page shows the error: You don’t have permission to access / on this server. server Unable to read htaccess file, Denying access to be safe
– RFL
@Rafaelacioly check the permissions to the directory
/var/www/magento
and its files. Check which user Apache is running: it must have read permissions in the vhost directory and its files. If you want to do an easy test, fully release permissions usingchmod -R 777 /var/www/magento
. After it works, re-restrict permissions to a more secure value.– Vinícius Gobbo A. de Oliveira