Keenetic > Entware > Debian Установка Apache2 Веб сервер

Тут будет некоторая информация по keenetic
Аватара пользователя
Артём Мамзиков
Admin
Сообщения: 914
Стаж: 5 лет 11 месяцев
Откуда: Вологодская область
Благодарил (а): 1 раз
Поблагодарили: 42 раза
Контактная информация:

Keenetic > Entware > Debian Установка Apache2 Веб сервер

Сообщение Артём Мамзиков »

Информация о системе:
mipsel stable debian
Показать
# Версия ОС

Код: Выделить всё

cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

# версию ОС и архитектура

Код: Выделить всё

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

# О системе

Код: Выделить всё

cat /etc/issue
Debian GNU/Linux 12 \n \l

# Версия ядра и о системе

Код: Выделить всё

cat /proc/version
Linux version 4.9-ndm-5 (developers@keenetic.com) (gcc version 13.2.0 (crosstool-NG 1.24.0-rc2-ndm-31-1 - NDMS Toolkit 1.0.0) ) #0 SMP Mon Nov 11 18:02:04 2024

# Версия ядра, тип машины и тип процессора

Код: Выделить всё

uname -mrs
Linux 4.9-ndm-5 mips

# Вся доступная системная информация, включая версию ядра, тип машины, тип процессора и имя ОС.

Код: Выделить всё

uname -a
Linux Keenetic-7717 4.9-ndm-5 #0 SMP Mon Nov 11 18:02:04 2024 mips GNU/Linux

# Оперативная память в МБ ***** total used free shared buff/cache available
Mem: 248 163 34 0 75 84
Swap: 2303 241 2062

# Диски, разделы и их размер NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 953,9G 0 disk
├─sda1 8:1 0 16M 0 part
├─sda2 8:2 0 127G 0 part
├─sda3 8:3 0 654,3G 0 part /mnt/owncloud/data
├─sda4 8:4 0 150,8G 0 part /opt
└─sda5 8:5 0 21,8G 0 part [SWAP]
mtdblock0 31:0 0 512K 1 disk
mtdblock1 31:1 0 512K 0 disk
mtdblock2 31:2 0 512K 0 disk
mtdblock3 31:3 0 1,9M 1 disk
mtdblock4 31:4 0 25,9M 1 disk
mtdblock5 31:5 0 27,8M 0 disk
mtdblock6 31:6 0 512K 0 disk
mtdblock7 31:7 0 2M 0 disk
mtdblock8 31:8 0 256K 0 disk
mtdblock9 31:9 0 31,8M 0 disk
mtdblock10 31:10 0 512K 0 disk
mtdblock11 31:11 0 512K 0 disk
mtdblock12 31:12 0 512K 0 disk
mtdblock13 31:13 0 27,8M 0 disk
mtdblock14 31:14 0 512K 0 disk
mtdblock15 31:15 0 34M 0 disk
mtdblock16 31:16 0 127,5M 1 disk
mtdblock17 31:17 0 65,8M 0 disk
zram0 240:0 0 256M 0 disk [SWAP]

# Использование диска системы, включая общий размер, используемый размер и доступный размер каждого диска Файловая система Размер Использовано Дост Использовано% Cмонтировано в
tmpfs 125M 0 125M 0% /dev
/dev/sda4 142G 39G 95G 30% /opt
/dev/sda3 655G 109G 546G 17% /mnt/owncloud/data

# Информация о процессоре

Код: Выделить всё

cat /proc/cpuinfo
system type : MediaTek MT7621 SoC
machine : Unknown
processor : 0
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 583.68
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VPE : 0
VCED exceptions : not available
VCEI exceptions : not available

processor : 1
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 583.68
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VPE : 1
VCED exceptions : not available
VCEI exceptions : not available

processor : 2
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 583.68
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 1
VPE : 0
VCED exceptions : not available
VCEI exceptions : not available

processor : 3
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 583.68
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 1
VPE : 1
VCED exceptions : not available
VCEI exceptions : not available
загрузка списков пакетов из репозиториев и "обновление" их

Код: Выделить всё

apt-get update
обновляет пакеты, которые уже установлены в системе и доставляет новые пакеты-зависимости
apt-get upgrade

Установка apache2

Код: Выделить всё

apt-get install apache2 apache2-bin apache2-data apache2-utils -y
php и mysql у нас уже установлен установим еще

Код: Выделить всё

apt-get install adminer phpmyadmin -y
Проверка свободности портов:

Код: Выделить всё

ss -tuln | grep :8075

Код: Выделить всё

ss -tuln | grep :4443
доменное имя в пример будет test.diyit.ru с привязанным белым IP

Что бы получить доступ снаружи данные порты не обходимо открыть в веб интерфейсе роутера
Межсетевой экран > Подключения Ethernet

Веб интерфейс у нас будет хранится в:
/var/www/html
облако
/var/www/owncloud


Включение Конфигураций Apache
Из папки /etc/apache2/conf-available в /etc/apache2/conf-enabled
Включаем командой a2enconf
Пример по раздельности каждый можно и одной строкой

Код: Выделить всё

a2enconf adminer.conf

Код: Выделить всё

a2enconf charset.conf

Код: Выделить всё

a2enconf localized-error-pages.conf

Код: Выделить всё

a2enconf other-vhosts-access-log.conf

Код: Выделить всё

a2enconf phpmyadmin.conf

Код: Выделить всё

a2enconf security.conf

Код: Выделить всё

a2enconf serve-cgi-bin.conf 
Отключение командой a2disconf
Пример: a2disconf phpmyadmin.conf

Получаем:

Код: Выделить всё

ls -1 /etc/apache2/conf-enabled
@adminer.conf
@charset.conf
@localized-error-pages.conf
@other-vhosts-access-log.conf
@phpmyadmin.conf
@security.conf
@serve-cgi-bin.conf


Включение Модулей Apache
Из папки /etc/apache2/mods-available в /etc/apache2/mods-enabled
Включаем командой a2enmod
Можно одной строкой

Код: Выделить всё

a2enmod access_compat alias auth_basic authn_core authn_file authz_core authz_host authz_user autoindex deflate dir env filter headers mime mpm_prefork negotiation php8.2 reqtimeout rewrite rpaf setenvif socache_shmcb ssl status
Отключение командой a2dismod
Пример: a2dismod php8.2

Получаем:

Код: Выделить всё

ls -1 /etc/apache2/mods-enabled
@access_compat.load
@alias.conf
@alias.load
@auth_basic.load
@authn_core.load
@authn_file.load
@authz_core.load
@authz_host.load
@authz_user.load
@autoindex.conf
@autoindex.load
@deflate.conf
@deflate.load
@dir.conf
@dir.load
@env.load
@filter.load
@headers.load
@mime.conf
@mime.load
@mpm_prefork.conf
@mpm_prefork.load
@negotiation.conf
@negotiation.load
@php8.2.conf
@php8.2.load
@reqtimeout.conf
@reqtimeout.load
@rewrite.load
@rpaf.conf
@rpaf.load
@setenvif.conf
@setenvif.load
@socache_shmcb.load
@ssl.conf
@ssl.load
@status.conf
@status.load


Включение Сайтов Apache
Из папки /etc/apache2/sites-available в /etc/apache2/sites-enabled
Включаем командой a2ensite

Код: Выделить всё

a2ensite 000-default-le-ssl.conf

Код: Выделить всё

a2ensite 000-default.conf
Отключение командой a2dissite
Пример: a2dissite 000-default.conf

Код: Выделить всё

ls -1 /etc/apache2/sites-enabled
@000-default.conf
@000-default-le-ssl.conf

Проверяем конфигурацию

Код: Выделить всё

apachectl configtest
Syntax OK

Перечитываем сервисы безе перезапуска

Код: Выделить всё

service apache2 reload
Если что то все таки не применилось тогда рестарт

Код: Выделить всё

service apache2 restart
Пример файлов
apache2.zip
apache2.zip
(79.14 КБ) 0 скачиваний
Настройка конфигурации apache2

Код: Выделить всё

mcedit /etc/apache2/apache2.conf
cat /etc/apache2/apache2.conf| grep -v ^# |awk 'NF'

Код: Выделить всё

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 /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</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

Код: Выделить всё

mcedit /etc/apache2/envvars

Код: Выделить всё

unset HOME
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
        SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
        SUFFIX=
fi
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
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
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
export LANG=C
export LANG

Код: Выделить всё

mcedit /etc/apache2/magic

Код: Выделить всё

0       belong          0x2e7261fd      audio/x-pn-realaudio
0       string          .RMF            application/vnd.rn-realmedia
0       string  MAS_UTrack_V00
>14     string  >/0             audio/x-mod
0       string  Extended\ Module: audio/x-mod
21      string/c        \!SCREAM!       audio/x-mod
21      string  BMOD2STM        audio/x-mod
1080    string  M.K.            audio/x-mod
1080    string  M!K!            audio/x-mod
1080    string  FLT4            audio/x-mod
1080    string  FLT8            audio/x-mod
1080    string  4CHN            audio/x-mod
1080    string  6CHN            audio/x-mod
1080    string  8CHN            audio/x-mod
1080    string  CD81            audio/x-mod
1080    string  OKTA            audio/x-mod
1080    string  16CN            audio/x-mod
1080    string  32CN            audio/x-mod
0       string          IMPM            audio/x-mod
0       string          \<?xml
>38     string          \<\!DOCTYPE\040svg      image/svg+xml
0       string          \<?xml                  text/xml
0       short           0xcafe
>2      short           0xbabe          application/java
0       string          .snd
>12     belong          1               audio/basic
>12     belong          2               audio/basic
>12     belong          3               audio/basic
>12     belong          4               audio/basic
>12     belong          5               audio/basic
>12     belong          6               audio/basic
>12     belong          7               audio/basic
>12     belong          23              audio/x-adpcm
0       lelong          0x0064732E
>12     lelong          1               audio/x-dec-basic
>12     lelong          2               audio/x-dec-basic
>12     lelong          3               audio/x-dec-basic
>12     lelong          4               audio/x-dec-basic
>12     lelong          5               audio/x-dec-basic
>12     lelong          6               audio/x-dec-basic
>12     lelong          7               audio/x-dec-basic
>12     lelong          23              audio/x-dec-adpcm
8       string          AIFF            audio/x-aiff
8       string          AIFC            audio/x-aiff
8       string          8SVX            audio/x-aiff
0       string  MThd                    audio/unknown
0       string  CTMF                    audio/unknown
0       string  SBI                     audio/unknown
0       string  Creative\ Voice\ File   audio/unknown
0       string          RIFF
>8      string          WAVE            audio/x-wav
>8      string/B        AVI             video/x-msvideo
>8      string          CDRA            image/x-coreldraw
0       beshort&0xfff6    0xfff0          audio/X-HX-AAC-ADTS
0       string          ADIF            audio/X-HX-AAC-ADIF
0       beshort&0xffe0  0x56e0          audio/MP4A-LATM
0       beshort         0x4De1          audio/MP4A-LATM
0       beshort&0xfffe  =0xfffa         audio/mpeg
0       string          ID3             audio/mpeg
0       string          OggS            application/ogg
0       string          /*\ XPM         image/x-xpmi 7bit
0       string          #!/bin/sh               application/x-shellscript
0       string          #!\ /bin/sh             application/x-shellscript
0       string          #!/bin/csh              application/x-shellscript
0       string          #!\ /bin/csh            application/x-shellscript
0       string          #!/bin/ksh              application/x-shellscript
0       string          #!\ /bin/ksh            application/x-shellscript
0       string          #!/bin/tcsh             application/x-shellscript
0       string          #!\ /bin/tcsh           application/x-shellscript
0       string          #!/usr/local/tcsh       application/x-shellscript
0       string          #!\ /usr/local/tcsh     application/x-shellscript
0       string          #!/usr/local/bin/tcsh   application/x-shellscript
0       string          #!\ /usr/local/bin/tcsh application/x-shellscript
0       string          #!/bin/bash                     application/x-shellscript
0       string          #!\ /bin/bash           application/x-shellscript
0       string          #!/usr/local/bin/bash   application/x-shellscript
0       string          #!\ /usr/local/bin/bash application/x-shellscript
0       string          #!/bin/zsh              application/x-shellscript
0       string          #!/usr/bin/zsh          application/x-shellscript
0       string          #!/usr/local/bin/zsh    application/x-shellscript
0       string          #!\ /usr/local/bin/zsh  application/x-shellscript
0       string          #!/usr/local/bin/ash    application/x-shellscript
0       string          #!\ /usr/local/bin/ash  application/x-shellscript
0       string          #!/bin/nawk             application/x-nawk
0       string          #!\ /bin/nawk           application/x-nawk
0       string          #!/usr/bin/nawk         application/x-nawk
0       string          #!\ /usr/bin/nawk       application/x-nawk
0       string          #!/usr/local/bin/nawk   application/x-nawk
0       string          #!\ /usr/local/bin/nawk application/x-nawk
0       string          #!/bin/gawk             application/x-gawk
0       string          #!\ /bin/gawk           application/x-gawk
0       string          #!/usr/bin/gawk         application/x-gawk
0       string          #!\ /usr/bin/gawk       application/x-gawk
0       string          #!/usr/local/bin/gawk   application/x-gawk
0       string          #!\ /usr/local/bin/gawk application/x-gawk
0       string          #!/bin/awk              application/x-awk
0       string          #!\ /bin/awk            application/x-awk
0       string          #!/usr/bin/awk          application/x-awk
0       string          #!\ /usr/bin/awk        application/x-awk
0       string          #!/bin/perl                     application/x-perl
0       string          #!\ /bin/perl                   application/x-perl
0       string          eval\ "exec\ /bin/perl          application/x-perl
0       string          #!/usr/bin/perl                 application/x-perl
0       string          #!\ /usr/bin/perl               application/x-perl
0       string          eval\ "exec\ /usr/bin/perl      application/x-perl
0       string          #!/usr/local/bin/perl           application/x-perl
0       string          #!\ /usr/local/bin/perl         application/x-perl
0       string          eval\ "exec\ /usr/local/bin/perl application/x-perl
0               string                  PK\003\004              application/x-zip
0       string          Rar!            application/x-rar
0       string          \037\036        application/octet-stream
0       short           017437          application/octet-stream
0       short           0x1fff          application/octet-stream
0       string          \377\037        application/octet-stream
0       short           0145405         application/octet-stream
257     string          ustar\0         application/x-tar       posix
257     string          ustar\040\040\0         application/x-tar       gnu
0       short           070707          application/x-cpio
0       short           0143561         application/x-cpio      swapped
0       string          =<ar>           application/x-archive
0       string          \!<arch>        application/x-archive
>8      string          debian          application/x-debian-package
0       beshort         0xedab
>2      beshort         0xeedb          application/x-rpm
0       lelong&0x8080ffff       0x0000081a      application/x-arc       lzw
0       lelong&0x8080ffff       0x0000091a      application/x-arc       squashed
0       lelong&0x8080ffff       0x0000021a      application/x-arc       uncompressed
0       lelong&0x8080ffff       0x0000031a      application/x-arc       packed
0       lelong&0x8080ffff       0x0000041a      application/x-arc       squeezed
0       lelong&0x8080ffff       0x0000061a      application/x-arc       crunched
0       leshort 0xea60  application/x-arj
2       string  -lh0-   application/x-lharc     lh0
2       string  -lh1-   application/x-lharc     lh1
2       string  -lz4-   application/x-lharc     lz4
2       string  -lz5-   application/x-lharc     lz5
2       string  -lzs-   application/x-lha       lzs
2       string  -lh\ -  application/x-lha       lh
2       string  -lhd-   application/x-lha       lhd
2       string  -lh2-   application/x-lha       lh2
2       string  -lh3-   application/x-lha       lh3
2       string  -lh4-   application/x-lha       lh4
2       string  -lh5-   application/x-lha       lh5
2       string  -lh6-   application/x-lha       lh6
2       string  -lh7-   application/x-lha       lh7
10      string  #\ This\ is\ a\ shell\ archive  application/octet-stream        x-shell
0       string          \<MakerFile     application/x-frame
0       string          \<MIFFile       application/x-frame
0       string          \<MakerDictionary       application/x-frame
0       string          \<MakerScreenFon        application/x-frame
0       string          \<MML           application/x-frame
0       string          \<Book          application/x-frame
0       string          \<Maker         application/x-frame
0       string/cB       \<!DOCTYPE\ html        text/html
0       string/cb       \<head  text/html
0       string/cb       \<title text/html
0       string/bc       \<html  text/html
0       string          \<!--   text/html
0       string/c        \<h1    text/html
0       string          \<?xml                  text/xml
0       string          P1              image/x-portable-bitmap 7bit
0       string          P2              image/x-portable-greymap        7bit
0       string          P3              image/x-portable-pixmap 7bit
0       string          P4              image/x-portable-bitmap
0       string          P5              image/x-portable-greymap
0       string          P6              image/x-portable-pixmap
0       string          IIN1            image/x-niff
0       string          MM              image/tiff
0       string          II              image/tiff
0       string          GIF94z          image/unknown
0       string          FGF95a          image/unknown
0       string          PBF             image/unknown
0       string          GIF             image/gif
0       beshort         0xffd8          image/jpeg
0       string          BM              image/x-ms-bmp
32769    string    CD001     application/x-iso9660
0       string          StuffIt                 application/x-stuffit
11      string  must\ be\ converted\ with\ BinHex\ 4    application/mac-binhex40
0       string  ;;                      text/plain      8bit
0       string  \012(                   application/x-elc
0       string  ;ELC\023\000\000\000    application/x-elc
0       string          Relay-Version:  message/rfc822  7bit
0       string          #!\ rnews       message/rfc822  7bit
0       string          N#!\ rnews      message/rfc822  7bit
0       string          Forward\ to     message/rfc822  7bit
0       string          Pipe\ to        message/rfc822  7bit
0       string          Return-Path:    message/rfc822  7bit
0       string          Received:       message/rfc822
0       string          Path:           message/news    8bit
0       string          Xref:           message/news    8bit
0       string          From:           message/rfc822  7bit
0       string          Article         message/news    8bit
0       string          \376\067\0\043                  application/msword
0       string          \320\317\021\340\241\261        application/msword
0       string          \333\245-\0\0\0                 application/msword
0       string          %!              application/postscript
0       string          \004%!          application/postscript
0       string          %PDF-           application/pdf
38      string          Spreadsheet     application/x-sc
0       string          \367\002        application/x-dvi
2       string          \000\021        application/x-tex-tfm
2       string          \000\022        application/x-tex-tfm
0       string          \\input\ texinfo                text/x-texinfo
0       string          This\ is\ Info\ file    text/x-info
0       leshort         0x02f7          application/x-dvi
0       string          {\\rtf          text/rtf
0       belong             0x000001BA
>4      byte               &0x40          video/mp2p
>4      byte               ^0x40          video/mpeg
0       belong             0x000001BB     video/mpeg
0       belong             0x000001B0     video/mp4v-es
0       belong             0x000001B5     video/mp4v-es
0       belong             0x000001B3     video/mpv
0       belong&0xFF5FFF1F  0x47400010     video/mp2t
0       belong             0x00000001
>4      byte&0x1F          0x07           video/h264
0       leshort         0xAF11                          video/fli
0       leshort         0xAF12                          video/flc
0       string          MOVI          video/sgi
4       string          moov          video/quicktime
4       string          mdat          video/quicktime
4       string          wide          video/quicktime
4       string          skip          video/quicktime
4       string          free          video/quicktime
4       string          idsc          image/x-quicktime
4       string          idat          image/x-quicktime
4       string          pckg          application/x-quicktime
4       string/B        jP            image/jp2
4       string          ftyp
>8      string          isom          video/mp4
>8      string          mp41          video/mp4
>8      string          mp42          video/mp4
>8      string/B        jp2           image/jp2
>8      string          3gp           video/3gpp
>8      string          avc1          video/3gpp
>8      string          mmp4          video/mp4
>8      string/B        M4A           audio/mp4
>8      string/B        qt            video/quicktime
0       byte            1                       video/unknown
0       byte            2                       video/unknown
0       belong  0x13579ace      application/x-gdbm
0       lelong  0x13579ace      application/x-gdbm
0       string  GDBM            application/x-gdbm
0       belong  0x061561        application/x-dbm
0       string          \177ELF
>16     leshort         0               application/octet-stream
>16     leshort         1               application/x-object
>16     leshort         2               application/x-executable
>16     leshort         3               application/x-sharedlib
>16     leshort         4               application/x-coredump
>16     beshort         0               application/octet-stream
>16     beshort         1               application/x-object
>16     beshort         2               application/x-executable
>16     beshort         3               application/x-sharedlib
>16     beshort         4               application/x-coredump
0               string                  MZ                              application/x-dosexec
0               string  [KDE\ Desktop\ Entry]   application/x-kdelnk
0               string  \#\ KDE\ Config\ File   application/x-kdelnk
0               string  \#\ xmcd                text/xmcd
0       string          #\ PaCkAgE\ DaTaStReAm  application/x-svr4-package
0       string          \x89PNG                 image/png
0       string          \x8aMNG                 video/x-mng
0       string          \x8aJNG                 video/x-jng
0       belong          0x0e031301              application/x-hdf
0       string          \211HDF\r\n\032         application/x-hdf
0       string          8BPS                    image/x-photoshop
0       string          d8:announce             application/x-bittorrent
0       belong  0x00001a00      application/x-123
0       belong  0x00000200      application/x-123
4       string  Standard\ Jet\ DB       application/msaccess
0       beshort         0x9900                  application/pgp
0       beshort         0x9501                  application/pgp
0       beshort         0x9500                  application/pgp
0       beshort         0xa600                  application/pgp-encrypted
2       string  ---BEGIN\ PGP\ PUBLIC\ KEY\ BLOCK-      application/pgp-keys
0       string  -----BEGIN\040PGP\40MESSAGE-                    application/pgp
0       string  -----BEGIN\040PGP\40SIGNATURE-                  application/pgp-signature
0       beshort         0x9901                  application/pgp
0       beshort         0x8501                  application/pgp-encrypted
0       string          FWS
>3      byte            x                       application/x-shockwave-flash
0       string          BZh                     application/x-bzip2
0       string          #VRML\ V1.0\ ascii      model/vrml
0       string          #VRML\ V2.0\ utf8       model/vrml
0       string          DOC
>43     byte            0x14            application/ichitaro4
>144    string  JDASH           application/ichitaro4
0       string          DOC
>43     byte            0x15            application/ichitaro5
0       string          DOC
>43     byte            0x16            application/ichitaro6
2080    string  Microsoft\ Excel\ 5.0\ Worksheet        application/excel
2114    string  Biff5                                   application/excel
0       string  \224\246\056            application/msword
0       belong  0x31be0000              application/msword
0       string  PO^Q`                   application/msword
0       string  \320\317\021\340\241\261\032\341
>546    string  bjbj                    application/msword
>546    string  jbjb                    application/msword
512     string  R\0o\0o\0t\0\ \0E\0n\0t\0r\0y   application/msword
2080    string  Microsoft\ Word\ 6.0\ Document  application/msword
2080    string  Documento\ Microsoft\ Word\ 6   application/msword
2112    string  MSWordDoc                       application/msword
0       string  \320\317\021\340\241\261\032\341        application/msword
0       string  #\ PaCkAgE\ DaTaStReAm  application/x-svr4-package
128             string  PE\000\000      application/octet-stream
0               string  PE\000\000      application/octet-stream
0               string  LZ              application/octet-stream
0               string  MZ
>24             string  @               application/octet-stream
0               string  MZ
>30             string  Copyright\ 1989-1990\ PKWARE\ Inc.      application/x-zip
0               string  MZ
>30             string  PKLITE\ Copr.   application/x-zip
0               string  MZ
>36             string  LHa's\ SFX      application/x-lha
0               string  MZ              application/octet-stream
2               string  -lh
>6              string  -               application/x-lha
20              lelong  0xfdc4a7dc      application/x-zoo
0               lelong&0x8080ffff       0x0000081a      application/x-arc
0               lelong&0x8080ffff       0x0000091a      application/x-arc
0               lelong&0x8080ffff       0x0000021a      application/x-arc
0               lelong&0x8080ffff       0x0000031a      application/x-arc
0               lelong&0x8080ffff       0x0000041a      application/x-arc
0               lelong&0x8080ffff       0x0000061a      application/x-arc
0               lelong  0x223e9f78      application/ms-tnef
0       string          AT&TFORM        image/x.djvu
0       string  \0\0MMXPR3\0    application/x-quark-xpress-3
0       belong  0x1ee7ff00      application/x-eet
0       string  fLaC            audio/x-flac
0       string  CWS             application/x-shockwave-flash
39      string          =<gmr:Workbook           application/x-gnumeric

Код: Выделить всё

mcedit /etc/apache2/ports.conf

Код: Выделить всё

Listen 8075
<IfModule ssl_module>
        Listen 4443
</IfModule>
количество слов: 3378
Аватара пользователя
Артём Мамзиков
Admin
Сообщения: 914
Стаж: 5 лет 11 месяцев
Откуда: Вологодская область
Благодарил (а): 1 раз
Поблагодарили: 42 раза
Контактная информация:

Keenetic > Entware > Debian Установка Apache2 Веб сервер

Сообщение Артём Мамзиков »

conf-available

Код: Выделить всё

mcedit /etc/apache2/conf-available/adminer.conf

Код: Выделить всё

Alias /adminer /etc/adminer

<Directory /etc/adminer>
	Require all granted
	DirectoryIndex conf.php
</Directory>

Код: Выделить всё

mcedit /etc/apache2/conf-available/charset.conf

Код: Выделить всё

#AddDefaultCharset UTF-8

Код: Выделить всё

mcedit /etc/apache2/conf-available/javascript-common.conf

Код: Выделить всё

Alias /javascript /usr/share/javascript/

<Directory "/usr/share/javascript/">
	Options FollowSymLinks MultiViews
</Directory>

Код: Выделить всё

mcedit /etc/apache2/conf-available/localized-error-pages.conf

Код: Выделить всё

mcedit /etc/apache2/conf-available/other-vhosts-access-log.conf

Код: Выделить всё

CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined

Код: Выделить всё

mcedit /etc/apache2/conf-available/php8.2-cgi.conf

Код: Выделить всё

<FilesMatch ".+\.ph(?:ar|p|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
    SetHandler application/x-httpd-php-source
        Require all denied
</FilesMatch>
<FilesMatch "^\.ph(?:ar|p|ps|tml)$">
    Require all denied
</FilesMatch>

Код: Выделить всё

mcedit /etc/apache2/conf-available/php8.2-fpm.conf

Код: Выделить всё

<IfModule !mod_php8.c>
<IfModule proxy_fcgi_module>
    <IfModule setenvif_module>
    SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    </IfModule>
    <FilesMatch ".+\.ph(?:ar|p|tml)$">
        SetHandler "proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost"
    </FilesMatch>
    <FilesMatch ".+\.phps$">
        Require all denied
    </FilesMatch>
    <FilesMatch "^\.ph(?:ar|p|ps|tml)$">
        Require all denied
    </FilesMatch>
</IfModule>
</IfModule>

Код: Выделить всё

mcedit /etc/apache2/conf-available/phpmyadmin.conf

Код: Выделить всё

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
    Options SymLinksIfOwnerMatch
    DirectoryIndex index.php
    AllowOverride All
/usr/share/phpmyadmin/:/usr/share/doc/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/:/usr/share/javascript/
    <IfModule mod_php.c>
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/usr/share/doc/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/:/usr/share/javascript/
    </IfModule>

</Directory>
<Directory /usr/share/phpmyadmin/templates>
    Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/libraries>
    Require all denied
</Directory>

Код: Выделить всё

mcedit /etc/apache2/conf-available/security.conf

Код: Выделить всё

ServerTokens Prod
ServerSignature Off
TraceEnable Off

Код: Выделить всё

mcedit /etc/apache2/conf-available/serve-cgi-bin.conf

Код: Выделить всё

<IfModule mod_alias.c>
	<IfModule mod_cgi.c>
		Define ENABLE_USR_LIB_CGI_BIN
	</IfModule>

	<IfModule mod_cgid.c>
		Define ENABLE_USR_LIB_CGI_BIN
	</IfModule>

	<IfDefine ENABLE_USR_LIB_CGI_BIN>
		ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
		<Directory "/usr/lib/cgi-bin">
			AllowOverride None
			Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
			Require all granted
		</Directory>
	</IfDefine>
</IfModule>

sites-available

Код: Выделить всё

mcedit /etc/apache2/sites-available/000-default-le-ssl.conf

Код: Выделить всё

<IfModule mod_ssl.c>
<VirtualHost *:4443>
	ServerName test.diyit.ru
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
	    <Directory /var/www/html>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    Alias /owncloud /var/www/owncloud
    <Directory /var/www/owncloud>
        Options +FollowSymlinks
        AllowOverride All
        <IfModule mod_dav.c>
            Dav off
        </IfModule>
        SetEnv HOME /var/www/owncloud
        SetEnv HTTP_HOME /var/www/owncloud
    </Directory>
SSLCertificateFile /etc/letsencrypt/live/test.diyit.ru/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/test.diyit.ru/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

Код: Выделить всё

mcedit /etc/apache2/sites-available/000-default.conf

Код: Выделить всё

<VirtualHost *:8075>
ServerName test.diyit.ru
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
	    <Directory /var/www/html>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    Alias /owncloud /var/www/owncloud
    <Directory /var/www/owncloud>
        Options +FollowSymlinks
        AllowOverride All
        <IfModule mod_dav.c>
            Dav off
        </IfModule>
        SetEnv HOME /var/www/owncloud
        SetEnv HTTP_HOME /var/www/owncloud
    </Directory>
</VirtualHost>

Код: Выделить всё

mcedit /etc/apache2/sites-available/default-ssl.conf

Код: Выделить всё

<VirtualHost *:4443>
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
	SSLEngine on
	SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
	SSLCertificateKeyFile   /etc/ssl/private/ssl-cert-snakeoil.key
	<FilesMatch "\.(?:cgi|shtml|phtml|php)$">
		SSLOptions +StdEnvVars
	</FilesMatch>
	<Directory /usr/lib/cgi-bin>
		SSLOptions +StdEnvVars
	</Directory>
</VirtualHost>
количество слов: 619
Ответить Вложения 1 Пред. темаСлед. тема

Вернуться в «Keenetic»