Не может получить доступ к моему веб-сайту после обновления версии сервера к 18,04 от 16,04 (капелька)

Когда я ввожу свой домен, я добираюсь:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Apache/2.4.29 (Ubuntu) Server at www.mywebsite.net Port 443

В моем журнале ошибок я нашел это:

/var/www/html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: https://www.google.lv/

Моя версия PHP, работающая php-v

PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies

У меня есть это в моем .htaccess

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^165\.227\.175\.218$
RewriteRule ^(.*)$ http://www.mywebsite.net/$1 [L,R=301]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# Wordfence WAF
<IfModule mod_php7.c>
php_value auto_prepend_file '/var/www/html/mywebsite/public_html/wordfence-waf.php'

В/var/www/html/mywebsite/public_html/wordfence-waf.php у меня есть это:

<?php
// Before removing this file, please verify the PHP ini setting          `auto_prepend_file` does not point to this.

 if (file_exists('/var/www/html/mywebsite/public_html/wp-content/plugins /wordfence/waf/bootstrap.php')) {
define("WFWAF_LOG_PATH", '/var/www/html/mywebsite/public_html/wp-content  /wflogs/');
include_once '/var/www/html/mywebsite/public_html/wp-content/plugins/wordfence/waf/bootstrap.php';
}
?>    

Я попробовал:

sudo a2enmod rewrite && sudo service apache2 restart
/etc/host.conf: line 3: bad command `nospoof on'
Module rewrite already enabled
/etc/host.conf: line 3: bad command `nospoof on'

/usr/sbin/apache2-V | grep MPM

[Tue Jan 08 12:05:13.506757 2019] [core:warn] [pid 6361] AH00111: Config   variabl e ${APACHE_LOCK_DIR} is not defined
[Tue Jan 08 12:05:13.506990 2019] [core:warn] [pid 6361] AH00111: Config variabl e ${APACHE_PID_FILE} is not defined
[Tue Jan 08 12:05:13.507254 2019] [core:warn] [pid 6361] AH00111: Config variabl e ${APACHE_RUN_USER} is not defined
[Tue Jan 08 12:05:13.507358 2019] [core:warn] [pid 6361] AH00111: Config variabl e ${APACHE_RUN_GROUP} is not defined
[Tue Jan 08 12:05:13.507469 2019] [core:warn] [pid 6361] AH00111: Config variabl e ${APACHE_LOG_DIR} is not defined
[Tue Jan 08 12:05:13.514596 2019] [core:warn] [pid 6361] AH00111: Config variabl e ${APACHE_RUN_DIR} is not defined
[Tue Jan 08 12:05:13.515068 2019] [core:warn] [pid 6361] AH00111: Config variabl e ${APACHE_LOG_DIR} is not defined
Server MPM: prefork

Попытка видеть, может ли эта ссылка помочь мне.

Я работал: sudo apachectl -t и добрался syntax ok. Я не могу работать sudo apache2 -X -f /etc/apache2/httpd.conf так как у меня нет a httpd.conf файл. Если я работаю: service apachectl start Я добираюсь Failed to start apachectl.service: Unit apachectl.service not found.

Это - мой /etc/apache2/envvars

# envvars - default environment variables for apache2ctl

# this won't be correct after changing uid
unset HOME

# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi

# Since there is no sane way to get the parsed apache2 config in     scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
# temporary state file location. This might be changed to /run in Wheezy 1
export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG

## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'

## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'

## If you would like to pass arguments to the web server, add them     below
## to the APACHE_ARGUMENTS environment.
#export APACHE_ARGUMENTS=''

## Enable the debug mode for maintainer scripts.
## This will produce a verbose output on package installations of web     server modules and web application
## installations which interact with Apache
#export APACHE2_MAINTSCRIPT_DEBUG=1

Любая справка о том, как получить доступ к моему веб-сайту снова, будет значительно цениться. У меня есть доступ SSH и через WinSCP и через Шпаклевку.

1
задан 9 January 2019 в 19:42

1 ответ

Обновление 18,04 причин модули PHP, которые будут отключены. Для меня, выполняя эти команды починил вещи:

sudo a2enmod php7.2
systemctl restart apache2
0
ответ дан 7 December 2019 в 21:52

Другие вопросы по тегам:

Похожие вопросы: