LinuxForum.Fans
Тема

Что делаю не так для установки Apache на Астра Линукс

Автор: u________49 3 сообщений 715 просмотров
27.01.2024 22:58 #439218

Добрый день, подскажите, что делаю не так или не делаю для установки Apache. Быть может для работы Apache нужно установить сетевые службы, если да то какие? Читаю форумы и документацию к apache, но решение пока не найдено.

То что делаю:
1) Устанавливаю астра линукс
2) [console]sudo apt update[/console]
3) [console]sudo apt install apache2[/console]
4) [console]sudo systemctl status apache2[/console]

text
? apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2024-01-27 15:43:19 MSK; 1h 0min ago
Docs: [url]https://httpd.apache.org/docs/2.4/[/url]
Main PID: 2521 (apache2)
Tasks: 6 (limit: 2271)
Memory: 3.6M
CGroup: /system.slice/apache2.service
+-2521 /usr/sbin/apache2 -k start
+-2525 /usr/sbin/apache2 -k start
+-2526 /usr/sbin/apache2 -k start
+-2527 /usr/sbin/apache2 -k start
+-3941 /usr/sbin/apache2 -k start
L-3953 /usr/sbin/apache2 -k start

янв 27 15:43:19 astra systemd[1]: Starting The Apache HTTP Server... янв 27 15:43:19 astra systemd[1]: Started The Apache HTTP Server.

5) [console]sudo netstat -tlpn[/console]

text
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 698/sshd
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 820/dnsmasq
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1128/smbd
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 702/postgres
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1128/smbd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 659/cupsd
tcp6 0 0 :::80 :::* LISTEN 2521/apache2
tcp6 0 0 ::1:631 :::* LISTEN 659/cupsd
tcp6 0 0 :::22 :::* LISTEN 698/sshd
tcp6 0 0 :::53 :::* LISTEN 820/dnsmasq
tcp6 0 0 :::139 :::* LISTEN 1128/smbd
tcp6 0 0 :::5432 :::* LISTEN 702/postgres
tcp6 0 0 :::445 :::* LISTEN 1128/smbd

6) [console]curl localhost[/console]
Получаю ошибку:

text
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
webmaster@localhost to inform them of the time this error occurred,
and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.4.52 (AstraLinux) Server at localhost Port 80</address>
</body></html>

к папке логов нет доступа, но в терминале отображает /var/log/apache2
7) [console]sudo cat /var/log/apache2/access.log
127.0.0.1 - - [27/Jan/2024:15:05:11 +0300] "GET /WeatherForecast HTTP/1.1" 500 807 "-" "curl/7.64.0"
127.0.0.1 - - [27/Jan/2024:15:11:49 +0300] "GET / HTTP/1.1" 500 807 "-" "curl/7.64.0"
127.0.0.1 - - [27/Jan/2024:15:14:27 +0300] "GET / HTTP/1.1" 500 807 "-" "curl/7.64.0"
127.0.0.1 - - [27/Jan/2024:17:58:07 +0300] "GET / HTTP/1.1" 500 807 "-" "curl/7.64.0"
127.0.0.1 - - [27/Jan/2024:20:34:38 +0300] "GET / HTTP/1.1" 500 807 "-" "curl/7.64.0"
127.0.0.1 - - [27/Jan/2024:20:35:33 +0300] "GET / HTTP/1.1" 500 807 "-" "curl/7.64.0"[/console]

8 ) [console]sudo cat /var/log/apache2/error.log[/console]

тут файл большой, но из 4 повторяющихся сообщений.

text
[Sat Jan 27 20:35:18.372335 2024] [ssl:warn] [pid 29682] AH01909: astraorel.test.local:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jan 27 20:35:18.373161 2024] [mpm_prefork:notice] [pid 29682] AH00163: Apache/2.4.52 (AstraLinux) mod_auth_kerb/5.4 OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Jan 27 20:35:18.373169 2024] [core:notice] [pid 29682] AH00094: Command line: '/usr/sbin/apache2'
[Sat Jan 27 20:35:33.624588 2024] [core:error] [pid 29683] [client 127.0.0.1:60250] Authentication not configured
28.01.2024 08:33 #439219

Ирина_С, всё, что надо для работы, подтянется в зависимостях.

"Ирина_С" написал:
2) sudo apt update
3) sudo apt install apache2

Вот между этими пунктами стоит сделать [console=inline]sudo apt upgrade[/console].

"Ирина_С" написал:
Loaded: loaded

При работе должно быть не "loaded", а "active".

"Ирина_С" написал:
к папке логов нет доступа

Вы можете устанавливать пакеты, но не имеете доступа к логам? Не верю, пробуйте через [console=inline]sudo mc[/console].
Вообще, судя по коду ошибки, это что-то с сервером.

P.S. Немного поправил ваше сообщение, сделал более читаемым :) .

31.01.2024 20:10 #439223

1. настроен ли файл vhost ?
2. AstraMode включен или выключен?
3. какие настройки аутентификации указаны в настройках виртуального хоста?
4. мандатные метки и уровни конфиденциальности задавали или нет.

Войдите или зарегистрируйтесь, чтобы ответить.