@kat-vetal

Error 403 Forbidden Ubuntu 18.04?

Добрый день. Решил перейти с винды на ubuntu, но не как не могу победить apache, на винде юзал openserver и все было хорошо, но здесь столкнулся с проблемой.
Установил apache, mysql, php, phpmyadmin, вроде все настроил и даже все взлетело(частично), получаю 403 при попытке доступа к сайту, применил chmod 777 рекурсивно ко всем файлам и папкам в итого если просмотреть свойства каталогов права на файлы и папки стоят правильные, но проблемы это не решает

конфиг моего виртуального хоста
<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin admin@dmw.loc
	ServerName dmw.loc
	ServerAlias www.dmw.loc
	DocumentRoot /media/vitaliy/Server/domains/dmw.loc/trunk/docroot

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Конфиг самого apache
DefaultRuntimeDir ${APACHE_RUN_DIR}

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

Include ports.conf


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

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

<Directory /media/vitaliy/Server/domains/>
	Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        Require all granted
	Require ip 127.0.0.1
	Require host localhost
</Directory>

AccessFileName .htaccess

<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

IncludeOptional conf-enabled/*.conf

IncludeOptional sites-enabled/*.conf


Лог обращения к серверу
127.0.0.1 - - [23/Jul/2018:11:22:56 +0300] "GET /robots.txt HTTP/1.1" 403 509 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:22:56 +0300] "GET /favicon.ico HTTP/1.1" 403 509 "http://dmw.loc/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:36:02 +0300] "GET / HTTP/1.1" 403 499 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:36:03 +0300] "GET /favicon.ico HTTP/1.1" 403 509 "http://dmw.loc/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:36:03 +0300] "GET / HTTP/1.1" 403 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:36:04 +0300] "GET /favicon.ico HTTP/1.1" 403 509 "http://dmw.loc/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:36:04 +0300] "GET / HTTP/1.1" 403 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:36:04 +0300] "GET /favicon.ico HTTP/1.1" 403 509 "http://dmw.loc/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:36:54 +0300] "-" 408 0 "-" "-"
127.0.0.1 - - [23/Jul/2018:11:38:13 +0300] "GET / HTTP/1.1" 403 499 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:38:13 +0300] "GET /favicon.ico HTTP/1.1" 403 509 "http://dmw.loc/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:38:14 +0300] "GET / HTTP/1.1" 403 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:38:14 +0300] "GET /favicon.ico HTTP/1.1" 403 509 "http://dmw.loc/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:39:04 +0300] "-" 408 0 "-" "-"
127.0.0.1 - - [23/Jul/2018:11:40:28 +0300] "GET / HTTP/1.1" 403 499 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
127.0.0.1 - - [23/Jul/2018:11:40:28 +0300] "GET /favicon.ico HTTP/1.1" 403 509 "http://dmw.loc/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
  • Вопрос задан
  • 706 просмотров
Пригласить эксперта
Ответы на вопрос 1
CityCat4
@CityCat4
Внимание! Изменился адрес почты!
Правила доступа не наследуются :) Если нужен виртхост - почему в нем нет правил allow/deny? Если виртхост не нужен - зачем его конфиг?
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы