Я работаю над миграцией прямо сейчас и после завершения всех необходимых шагов, я столкнулся с этой ошибкой, когда я пытаюсь получить доступ к веб-сайту.
You don't have permission to access /wp-admin/install.php on this server.
Я действительно проверял свой журнал ошибок, и это - то, что он придумывает:
sudo tail -10 /var/log/apache2/error.log
Ошибки следующие:
[Fri Mar 29 16:26:58.360971 2019] [access_compat:error] [pid 41530] [client 66.102.6.237:43764] AH01797: client denied by server configuration: /var/www/html/path_to_files/wp-admin/install.php
[Fri Mar 29 16:29:21.855448 2019] [mpm_prefork:notice] [pid 41505] AH00169: caught SIGTERM, shutting down
[Fri Mar 29 16:29:22.220074 2019] [mpm_prefork:notice] [pid 41633] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Mar 29 16:29:22.220165 2019] [core:notice] [pid 41633] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 29 16:29:57.546844 2019] [mpm_prefork:notice] [pid 41633] AH00169: caught SIGTERM, shutting down
[Fri Mar 29 16:29:57.653695 2019] [mpm_prefork:notice] [pid 41707] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Mar 29 16:29:57.653762 2019] [core:notice] [pid 41707] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 29 16:30:05.134525 2019] [access_compat:error] [pid 41726] [client 130.63.49.63:52630] AH01797: client denied by server configuration: /var/www/html/path_to_files/wp-admin/install.php
[Fri Mar 29 16:42:30.993688 2019] [access_compat:error] [pid 41732] [client 130.63.49.63:52828] AH01797: client denied by server configuration: /var/www/html/path_to_files/wp-admin/install.php
[Fri Mar 29 16:42:34.331212 2019] [access_compat:error] [pid 41732] [client 130.63.49.63:52828] AH01797: client denied by server configuration: /var/www/html/path_to_files/wp-admin/install.php
Мой .conf следующие:
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
DocumentRoot /var/www/html/path_to_files
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Версия Apache2: 2.4.29 (Ubuntu). Мои полномочия файла были установлены на 755.
Любая справка о том, как разрешить это, была бы большой.
Код .htaccess:
<files .htaccess>
Order allow,deny
Deny from all
</files>
<files readme.html>
Order allow,deny
Deny from all
</files>
<files readme.txt>
Order allow,deny
Deny from all
</files>
<files install.php>
Order allow,deny
Deny from all
</files>
<files wp-config.php>
Order allow,deny
Deny from all
</files>
Необходимо временно отключить блокирующий доступ к файлам установки php, после того, как установка завершена - позволяют блокироваться снова. Deny from all
блокирует доступ для всех. Allow from your-ip
включит доступ только для Вас. Место "Позволяет", прежде Отклоняют на отдельной строке.
Этот раздел:
<files install.php>
Order allow,deny
Deny from all
</files>
<files wp-config.php>
Order allow,deny
Deny from all
</files>
Обновление: Вместо порядка использования позвольте, отклоните, существует новая опция 'Require', таким образом, разделы должны быть похожими на это:
<files install.php>
Require host address
# or Require ip ip.address
# or Require local
</files>