apache2 vagrant boxon - 403 Forbidden

Fórumok

Sziasztok,

egy, a laborban levo hoston vagrant boxra apache-ot tettem fel, de vhogy 403 Forbidden hibat kapok.
Alul lathatok a parancsok, amiket hasznaltam:

hoston mint root user:
======================

cd /data
mkdir testproject5
cd testproject5
vagrant box add boxapache-trusty64 /data/trusty-server-cloudimg-amd64-vagrant-disk1.box

cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
config.vm.define "boxapache-trusty64" do |boxapache|
boxapache.vm.box = "boxapache-trusty64"
boxapache.vm.hostname = "boxapache-trusty64"
boxapache.vm.network :forwarded_port, guest: 80, host: 8080
end
end

vagrant up

vagrant ssh

a boxon:
========
su -
cat /etc/apt
vi sources.list
exit
sudo apt-get update
sudo apt-get install apache2
sudo rm -rf /var/www
sudo ln -fs /vagrant /var/www
exit

a hoston mint root:
===================


/data/testproject5# echo "Hello" > index.html
/data/testproject5# ls -ltr

total 8
-rw------- 1 root root 325 Aug 2 06:24 Vagrantfile
-rw------- 1 root root 23 Aug 2 06:31 index.html

Kiprobalva a notebookrol a kovetkezo hibat kapom:
=================================================
http://host_ip:8080

403 Forbidden:
Forbidden

You don't have permission to access / on this server.
Apache/2.4.7 (Ubuntu) Server at host_ip_cime Port 8080

a boxon ezt a hibat latom:
[Tue Aug 02 06:34:43.871705 2016] [mpm_event:notice] [pid 3167:tid 139910939977600] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Tue Aug 02 06:34:43.871818 2016] [core:notice] [pid 3167:tid 139910939977600] AH00094: Command line: '/usr/sbin/apache2'
[Tue Aug 02 06:34:51.039987 2016] [core:error] [pid 3170:tid 139910855796480] (13)Permission denied: [client 10.0.2.2:64409] AH00035: access to / denied (filesystem path '/var/www/html') because search permissions are missing on a component of the path
[Tue Aug 02 06:36:25.952275 2016] [core:error] [pid 3170:tid 139910774257408] (13)Permission denied: [client 10.0.2.2:64410] AH00035: access to / denied (filesystem path '/var/www/html') because search permissions are missing on a component of the path
root@boxapache-trusty64:/var/log/apache2#

Mit futtattam rosszul?
Koszi elore a segitseget.
Ardi

Hozzászólások

Megoldottam igy:

cd /data/tesproject5
mkdir "LOCAL FOLDER"

vi Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
config.vm.define "boxapache-trusty64" do |boxapache|
boxapache.vm.box = "boxapache-trusty64"
boxapache.vm.hostname = "boxapache-trusty64"
boxapache.vm.network :forwarded_port, guest: 80, host: 8080
boxapache.vm.synced_folder "LOCAL FOLDER", "/var/www/html", mount_options: ["dmode=777","fmode=666"]
end
end

majd:
vagrant up
vagrant ssh
sudo apt-get update
sudo apt-get install apache2

ezek utan az index.html a /var/www/html konyvtarban talalhato a boxon.
A hoston pedig a /data/tesproject5/LOCAL FOLDER konyvtarban lathato.

Es nem hasznaltam a kovetkezo 2 parancsot:

sudo rm -rf /var/www
sudo ln -fs /vagrant /var/www

Ezek utan: http://host_ip_cime:8080 automatikusan nyitja az apache index.html fajljat.

Meg kell meg neznem a mount_options: ["dmode=777","fmode=666"] parametereket, mit is jelentenek pontosan.

Koszi a segitseget!
Ardi