W
W
wapalico2014-04-19 17:51:33
LAMP
wapalico, 2014-04-19 17:51:33

How to add a host to /home? (LAMP)

Installed LAMP. Everything is working. I start adding a new host to my home folder, I access the site both by name and by ip, the browser writes to me:

Forbidden
You don't have permission to access / on this server.

Path to index.html file
/home/wapalico/web/www/mysite.local/index.html
: Hosts file:
127.0.0.1 localhost mysite.local
Mysite.local.conf file:
<VirtualHost *:80>
        ServerName mysite.local
  ServerAdmin [email protected]
  DocumentRoot /home/wapalico/web/www/mysite.local/
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

If the host is moved to /var/www and the appropriate path changes are made to mysite.local.conf, then everything works fine.
Fulfilled:
sudo chmod -R 777 /home/wapalico/web/www/
In the line
<VirtualHost *:80>
I changed the asterisk to 127.0.0.1
I hung up the host on another ip.
Created a .htaccess file in the site folder to DirectoryIndex index.html
no avail. Tell me what's the problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wapalico, 2014-04-19
@wapalico

The solution was prompted by andwer07 , from forum.ubuntu.ru
Added the following lines to the apache2.conf file:

<Directory /home/wapalico/web/www/>
  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted
</Directory>

Restarted and everything worked

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question