Содержание
- Форум
- REST -> 403 Forbidden Denied
- REST -> 403 Forbidden Denied
- Форум
- Ошибка 403 The requested URL /test.com was not found on this server.
- Ошибка 403 The requested URL /test.com was not found on this server.
- Форум
- Проблема
- Проблема
- Apache 403 Forbidden: Reasons and How to Fix It
- Apache 403 Forbidden: Effects and Possible Causes
- How to Fix ‘403 Forbidden’ in Apache
- Method 1: Setting File Permissions and Ownership
- Method 2: Setting Apache Directives
- Method 3: Adding a Default Directory Index
- 🛠️ Исправляем ошибку “Forbidden – You don’t have permission to access / on this server”
- Так что вызывает такие ошибки?
- 1. Неправильные права доступа к файлам / каталогам
- 2. Неправильная настройка файлов конфигурации Apache
- Фиксим ‘403 Forbidden Error’
- 1. Настройте права доступа к файлам и владение каталогом webroot
- 2. Настройте директивы в главном конфигурационном файле Apache
Форум
REST -> 403 Forbidden Denied
REST -> 403 Forbidden Denied
Непрочитанное сообщение yoyo » 19 мар 2013, 16:33
Непрочитанное сообщение yoyo » 20 мар 2013, 16:41
Их уже даже на виртуальных хостингах не запрещают в целях безопасности
P.S. Что делать, если такая штука, когда стоит Апач + Нгинх, Вышеописанные способы не подходят
1) Создатель это читает, а вот писатель видимо и не знает что многие пользователи Open Server ставят в настройки * в качестве адреса и имеют ip доступный из сети. При таком раскладе MySQL взламывается за час (пауки, сканеры, боты), php в случае установки дырявых скриптов чуть дольше, остальное тоже приходится защищать всеми доступными способами.
2) На реальный хостинг (под Windows Server) ставят и ставят чаще чем вы думаете (ко мне периодически обращаются за настройкой). Но в этом нет ничего страшного, все компоненты в сборке официальные и надежность того же apache или php целиком зависит от разработчиков. Все настройки в Open Server безопасны, часть по умолчанию, часть нужно активировать. Пускай люди ставят куда хотят и используют как хотят, но только в случае правильной настройки
3) Файл конфигурации на то есть, чтобы каждый мог настроить под себя как ему вздумается. Я могу настроить Open Server по умолчанию как угодно, не совсем понимаю почему вас волнует этот вопрос, если вы вправе редактировать конфигурацию в полной мере без каких-либо препятствий.
Вот отредактируйте мне конфигурацию, чтобы REST заработал в связке Apache + nGinx, у меня не получилось
Источник
Форум
Ошибка 403 The requested URL /test.com was not found on this server.
Всем здрасть!
Проблемка такая,Open Server пользуюсь впервые,до этого был денвер,делаю все как обычно,закидаю в папку domain свою папку test.com далее файлы движка(на основе dcms 6.6.4) запускаю и при попытке набрать адрес в строке браузера выдает вот такую безпредельщину
Forbidden
You don’t have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Все файлы в папке присутствуют как index.php так и .htaccess в чем причина не пойму.
Добавлено спустя 5 минут 45 секунд:
Файл hosts в порядке
# Start Open Server 8de4919f0882e1c505dca2dbb6e910a6_hosts
127.0.0.1 localhost
127.0.0.1 test1.ru
127.0.0.1 test.com
# End Open Server 8de4919f0882e1c505dca2dbb6e910a6_hosts
Нет там никаких папок,.htaccess переделывал устанавливал php.ini ничего не дало.да и не могло дать,обычно при ошибке файла .htaccess выдает ошибку 500 но не 403
Добавлено спустя 4 минуты 6 секунд:
Вот логи Apache,все нормально,не пойму что тогда мешает запустить сайт.
localhost: 127.0.0.1 [28/May/2013:12:42:31 +0400] «GET /openserver/check.html HTTP/1.0» 200 18 «-» «Mozilla/4.0 (compatible; ICS)»
localhost: 127.0.0.1 [28/May/2013:12:42:31 +0400] «GET /openserver/check.html HTTP/1.0» 200 18 «-» «Mozilla/4.0 (compatible; ICS)»
localhost: 127.0.0.1 [28/May/2013:12:42:31 +0400] «GET /openserver/check.html HTTP/1.0» 200 18 «-» «Mozilla/4.0 (compatible; ICS)»
localhost: 127.0.0.1 [28/May/2013:12:42:31 +0400] «GET /openserver/check.php HTTP/1.0» 200 18 «-» «Mozilla/4.0 (compatible; ICS)»
test1.ru: 127.0.0.1 [28/May/2013:12:42:39 +0400] «GET / HTTP/1.1» 404 — «-» «Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.14»
test1.ru: 127.0.0.1 [28/May/2013:12:42:39 +0400] «GET /favicon.ico HTTP/1.1» 404 — «http://test1.ru/» «Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.14»
Добавлено спустя 2 минуты 44 секунды:
Ага попробывал добавить в ручную домен,пошел.
Добавлено спустя 18 минут 34 секунды:
Блин ниче не пойму,все как бы заработало,но чтраница чистая. К базе подключение идет,но ничего нет на экране монитора
Добавлено спустя 34 минуты 31 секунду:
Все кроем тему,разобрался,2 скрипта не давали нормально работать оформлению.
Источник
Форум
Проблема
Проблема
у меня случилась такая беда,вопщем смотрите сами и я не знаю что делать:(
You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
92.255.251.140
10/06/12 00:41:16
Apache
фаил есть если не ошибаюсь,ну как указать пусть?
Добавлено спустя 2 часа 47 минут 43 секунды:
путь*
таже беда, localhost открывается норм а с вне — форбиден
[error]You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.[/error]
[log]Directory index forbidden by Options directive:
индексные файлы есть везде.
хотя пути указаны вручную нормально.
IP адрес поставил — *
nusqasun писал(а): таже беда, localhost открывается норм а с вне — форбиден
[error]You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.[/error]
[log]Directory index forbidden by Options directive:
индексные файлы есть везде.
хотя пути указаны вручную нормально.
IP адрес поставил — *
скачал последнюю версию,
IP адрес поставил — *
прописал домены вручную.
————
интересно получается что когда ставишь автомат — сервак запускается, а когда ставишь ручной и добавляешь какойнибудь домен то вылазиет ошибка что доменов нет (пока локалхост не добавишь)
это нормально?
————
есть админские права
etchosts — атрибуты изменил, а вернее убрал все.
поставил галочку — чтоб требовал админа.
всё равно работает в ограниченном режиме.
а вообще интересно зачем эта жёсткая привязка к хостс? чтобы в ней написать — localhost 127.0.0.1 а если не дали то не давать заходить из вне.
хотя я просто чего-то не знаю.
————
в общем, гребля второй день
Источник
Apache 403 Forbidden: Reasons and How to Fix It
Home » Networking » Apache 403 Forbidden: Reasons and How to Fix It
Apache is a popular open-source app for running web servers, owing to its reliability and stability. Despite its ease of use, it’s not uncommon to encounter a ‘403 Forbidden’ error after setting up a website using Apache.
In this tutorial, we will go over potential causes of the Apache ‘403 Forbidden’ error and different ways you can fix it.
- A user account with root or sudo privileges
- Access to the command line terminal
- An installed version of Apache web server
Apache 403 Forbidden: Effects and Possible Causes
The Apache ‘403 Forbidden’ error appears when you try to load a web page with restricted access. Depending on your browser and the website in question, there are different versions of the 403 error message:
- Forbidden
- Error 403
- HTTP Error 403.14 – Forbidden
- 403 Forbidden
- HTTP 403
- Forbidden: You don’t have permission to access the site using this server
- Error 403 – Forbidden
- HTTP Error 403 – Forbidden
There are several potential reasons why the Apache 403 error occurs:
- The first option is a permission error in the webroot directory, where users don’t have access to website files.
- The second possible reason for a 403 error is missing or incorrect settings in the Apache configuration files.
- Finally, failing to set up a default directory index also triggers a 403 error message in Apache.
How to Fix ‘403 Forbidden’ in Apache
If you have come across an Apache ‘403 Forbidden’ message, there are several ways to fix it:
Method 1: Setting File Permissions and Ownership
If you suspect the cause of the 403 error to be incorrect file permissions, use:
The chmod command sets the execute permission for the webroot directory and read permission for the index.html file.
To change directory ownership, use:
- user is the user account with root privileges on your web server.
- group is www-data or apache .
Restart the Apache web server for the changes to take effect.
If you are working with Ubuntu, use the following command to restart Apache:
If you are working with Centos, use:
Note: If you are having difficulties to restart the Apache service, see our articles: How to Restart Apache on CentOS or How Restart Apache on Ubuntu.
Method 2: Setting Apache Directives
It is possible that the proper require directive is not configured and restricts access to resources. To fix it:
1. Access Apache’s main configuration file. For Ubuntu, use:
2. Once you open the configuration file, scroll down to the following section:
3. If the final line in the section contains Require all denied , change it to Require all granted .
4. Press Ctrl+X and then Y to save changes to the Apache configuration file.
5. Restart the Apache web server for the changes to take effect. For Ubuntu, use:
Method 3: Adding a Default Directory Index
When a user visits a URL that requests a directory, the web server looks for a file in the given directory. If the file or any similar files are not found, and directory index listings are disabled, the web server displays the ‘403 Forbidden’ error message.
To fix the issue, add a default directory index.
1. Access Apache’s main configuration file by using:
2. Scroll down to find out the default index file name:
3. Make sure there is a file in the webroot folder with this name and upload it if it’s missing.
After following this tutorial, you should be able to determine the cause of an Apache ‘403 Forbidden’ error and fix any issues you may find.
If you want to find out more about 403 forbidden error, read our article 403 forbidden error — what is it and how to fix it.
Источник
🛠️ Исправляем ошибку “Forbidden – You don’t have permission to access / on this server”
Веб-сервер управляет огромным рынком, особенно на платформах веб-хостинга.
Как бы то ни было, вы можете получить ошибку «Forbidden – You don’t have permission to access / on this server» в вашем браузере после настройки вашего веб-сайта.
- HTTP Error 403 – Forbidden
- Forbidden: You don’t have permission to access [directory] on this server
- 403 Forbidden
- Access Denied You don’t have permission to access
- 403 forbidden request forbidden by administrative rules
Так что вызывает такие ошибки?
‘403 ошибка‘ возникает по следующим основным причинам:
1. Неправильные права доступа к файлам / каталогам
2. Неправильная настройка файлов конфигурации Apache
Эта ошибка также может быть связана с неправильной настройкой одного из файлов конфигурации Apache.
Это может быть неверный параметр, который был включен по ошибке, или отсутствующие директивы в файле конфигурации.
Фиксим ‘403 Forbidden Error’
Если вы столкнулись с этой ошибкой, вот несколько шагов, которые вы можете предпринять, чтобы исправить это.
1. Настройте права доступа к файлам и владение каталогом webroot
Известно, что неправильные права доступа к файлам и владение каталогами ограничивают доступ к файлам сайта .
Поэтому, во-первых, убедитесь, что права доступа к файлам рекурсивно назначены каталогу webroot, как показано далее.
Каталог webroot всегда должен иметь разрешения EXECUTE, а файл index.html должен иметь разрешения READ.
Кроме того, настройте владельца каталога, как показано далее:
Где user является обычным вошедшим в систему пользователем, а группа – www-data или apache.
Наконец, перезапустите веб-сервер Apache, чтобы изменения вступили в силу.
2. Настройте директивы в главном конфигурационном файле Apache
Сохраните и выйдите, а затем перезапустите Apache.
Если вы используете Apache в системах RHEL / CentOS, убедитесь, что вы ослабили доступ к каталогу /var/www в главном файле конфигурации Apache /etc/httpd/conf/httpd.conf.
Если статья написана для обычных юзеров, то скажу Вам как обычный юзер, вот это связать между собой не реально
“Каталог webroot всегда должен иметь разрешения EXECUTE, а файл index.html должен иметь разрешения READ.
$ sudo chmod -R 775 /path/to/webroot/directory”
Где в приведенном примере разрешения EXECUTE?
И где расширение READ?
Для тех кто пишет коды самостоятельно подобные статьи в принципе не нужны, а те, кто используют для кодов сторонние программы, в таких статьях в принципе ничего понять не могут, кроме того, что нужно давать какие то доступы.
А тут не надо “писать коды”, достаточно знать 4 – чтение, 2 запись, 1 – выполнение
А мне помогло, дал права как в примере и завелся сайт и базы данных подтянулись, спасибо.
Источник
Привет. Не знаю ошибся веткой или нет. Помогите разобраться новичку. Поставил OpenServer.
Apache-2.4×64
PHP 5.5-x64
MySQL 5.5-x64
Локально запустил на нем движок чтобы разобраться что да как. В принципе многое сделал. Но вот дошел до загрузки файлов с сайта своего. В админке без проблем загружаю для скачивания файл. Но при его скачивании по ссылке на сайте выходит ошибка
Access forbidden!
You don’t have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
Лог говорит следующее [core:error] [pid 1568:tid 860] (22)Invalid argument: [client 127.0.0.1:3728] AH00127: Cannot map GET HTTP/1.1 to file, referer: http://
Apache
Гуглил. Многое правил. Но воз и ныне там. Выложу сразу содержимое конфига .htaccess и Apache.
При открытии конфига Apache, открывается два файла: вот первый —
Код
#-----------------------------------------------# # Начало блока конфигурации HTTP хоста #-----------------------------------------------# <VirtualHost *:%httpport%> DocumentRoot "%hostdir%" ServerName "%host%" ServerAlias "%host%" %aliases% ScriptAlias /cgi-bin/ "%hostdir%/cgi-bin/" </VirtualHost> #-----------------------------------------------# # Конец блока конфигурации HTTP хоста #-----------------------------------------------# #-----------------------------------------------# # Начало блока конфигурации HTTPS хоста #-----------------------------------------------# <IfModule ssl_module> <VirtualHost *:%httpsport%> DocumentRoot "%hostdir%" ServerName "%host%" ServerAlias "%host%" %aliases% ScriptAlias /cgi-bin/ "%hostdir%/cgi-bin/" SSLEngine on #Header always set Strict-Transport-Security "max-age=94608000" #SSLCACertificateFile "" #SSLCertificateChainFile "" SSLCertificateFile "%sprogdir%/userdata/config/cert_files/server.crt" SSLCertificateKeyFile "%sprogdir%/userdata/config/cert_files/server.key" SetEnvIf User-Agent ".*MSIE [1-5].*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 SetEnvIf User-Agent ".*MSIE [6-9].*" ssl-unclean-shutdown <FilesMatch ".(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "%hostdir%/cgi-bin/"> SSLOptions +StdEnvVars </Directory> </VirtualHost> </IfModule> #-----------------------------------------------# # Конец блока конфигурации HTTPS хоста #-----------------------------------------------#
__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь
Notice that another issue that might be causing this is that, the «FollowSymLinks» option of a parent directory might have been mistakenly overwritten by the options of your project’s directory. This was the case for me and made me pull my hair until I found out the cause!
Here’s an example of such a mistake:
<Directory />
Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
<Directory /var/www/>
Options Indexes # <--- NOT OK! It's overwriting the above option of the "/" directory.
AllowOverride all
Require all granted
</Directory>
So now if you check the Apache’s log message(tail -n 50 -f /var/www/html/{the_error_log_file_of_your_site}
) you’ll see such an error:
Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive
is also forbidden due to its similar ability to circumvent directory restrictions
That’s because Indexes
in the above rules for /var/www
directory is overwriting the FolowSymLinks
of the /
directory. So now that you know the cause, in order to fix it, you can do many things depending on your need. For instance:
<Directory />
Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
<Directory /var/www/>
Options FollowSymLinks Indexes # <--- OK.
AllowOverride all
Require all granted
</Directory>
Or even this:
<Directory />
Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
<Directory /var/www/>
Options -Indexes # <--- OK as well! It will NOT cause an overwrite.
AllowOverride all
Require all granted
</Directory>
The example above will not cause the overwrite issue, because in Apache, if an option is «+» it will overwrite the «+»s only, and if it’s a «-«, it will overwrite the «-«s… (Don’t ask me for a reference on that though, it’s just my interpretation of an Apache’s error message(checked through journalctl -xe
) which says: Either all Options must start with + or -, or no Option may.
when an option has a sign, but another one doesn’t(E.g., FollowSymLinks -Indexes). So it’s my personal conclusion -thus should be taken with a grain of salt- that if I’ve used -Indexes
as the option, that will be considered as a whole distinct set of options by the Apache from the other option in the «/» which doesn’t have any signs on it, and so no annoying rewrites will occur in the end, which I could successfully confirm by the above rules in a project directory of my own).
Hope that this will help you pull much less of your hair!
Notice that another issue that might be causing this is that, the «FollowSymLinks» option of a parent directory might have been mistakenly overwritten by the options of your project’s directory. This was the case for me and made me pull my hair until I found out the cause!
Here’s an example of such a mistake:
<Directory />
Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
<Directory /var/www/>
Options Indexes # <--- NOT OK! It's overwriting the above option of the "/" directory.
AllowOverride all
Require all granted
</Directory>
So now if you check the Apache’s log message(tail -n 50 -f /var/www/html/{the_error_log_file_of_your_site}
) you’ll see such an error:
Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive
is also forbidden due to its similar ability to circumvent directory restrictions
That’s because Indexes
in the above rules for /var/www
directory is overwriting the FolowSymLinks
of the /
directory. So now that you know the cause, in order to fix it, you can do many things depending on your need. For instance:
<Directory />
Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
<Directory /var/www/>
Options FollowSymLinks Indexes # <--- OK.
AllowOverride all
Require all granted
</Directory>
Or even this:
<Directory />
Options FollowSymLinks
AllowOverride all
Require all denied
</Directory>
<Directory /var/www/>
Options -Indexes # <--- OK as well! It will NOT cause an overwrite.
AllowOverride all
Require all granted
</Directory>
The example above will not cause the overwrite issue, because in Apache, if an option is «+» it will overwrite the «+»s only, and if it’s a «-«, it will overwrite the «-«s… (Don’t ask me for a reference on that though, it’s just my interpretation of an Apache’s error message(checked through journalctl -xe
) which says: Either all Options must start with + or -, or no Option may.
when an option has a sign, but another one doesn’t(E.g., FollowSymLinks -Indexes). So it’s my personal conclusion -thus should be taken with a grain of salt- that if I’ve used -Indexes
as the option, that will be considered as a whole distinct set of options by the Apache from the other option in the «/» which doesn’t have any signs on it, and so no annoying rewrites will occur in the end, which I could successfully confirm by the above rules in a project directory of my own).
Hope that this will help you pull much less of your hair!