Тип сервиса
Сервис Apache HTTP server
Веб-сервер Apache HTTP Server для отдачи веб-контента с редактируемой конфигурацией сервера и виртуальных хостов.
Этот сервис запускает ваш код: его образ собирается из Git-репозитория, а каждая сборка развёртывается в окружение.
На этой странице
Технический профиль
Версии, репозиторий исходного кода и Helm-чарт.
Стеки с этим сервисом
Публичные стеки, в которые входит этот сервис.
Сборка из исходного кода и CI/CD
Шаблоны проектов, Git-провайдеры, CI и реестры контейнеров.
Конфигурация сервиса
Файлы конфигурации и настройки.
Сервисы на его основе
Сервисы каталога, которые наследуют этот сервис.
В StackMaster
Как Apache HTTP server работает в StackMaster
.htaccess files.How it is configured
On every start the container renders its configuration from templates and environment variables: conf/httpd.conf, conf/conf.d/vhost.conf (one virtual host) and conf/preset.conf under /usr/local/apache2. They are rewritten on each start; never edit them in a running container.
To change the configuration:
- Set
APACHE_*environment variables on the service. - Change the
docrootsetting. - Override the main configuration template or the virtual host template, both declared as config files of this service.
- Add
.htaccessfiles to the codebase: overrides are allowed in the document root (APACHE_ALLOW_OVERRIDE_ENABLED), andmod_rewrite,mod_headers,mod_expiresandmod_deflateare loaded.
Preset
APACHE_VHOST_PRESET selects the rules included in the virtual host. This service uses the image default, html: files are served from the document root with index.html as the directory index (APACHE_DIRECTORY_INDEX). There is no fallback for paths that match no file; a single-page application needs its own rewrite rule in .htaccess. The image also ships a php preset, used by the PHP service built on this one.
Document root
The codebase is at /var/www/html. The docroot setting (variable DOCROOT_SUBDIR) names a subdirectory of the repository, and APACHE_DOCUMENT_ROOT is set to /var/www/html/ followed by it. Leave the setting empty to serve the repository root.
Always present
/.healthzreturns 204 and is not logged. Use it for health checks.- Files and directories whose names start with a dot are denied, as are files ending in
.sh,.sql,.mysql,.po,.tpl,.makeor.test,wodby.ymlandMakefile. - Directory listings are off unless
APACHE_INDEXES_ENABLEDis set.
Variables that matter most
| Variable | Effect |
|---|---|
APACHE_DIRECTORY_INDEX | directory index file |
APACHE_ALLOW_OVERRIDE_ENABLED | what .htaccess files may override |
APACHE_TIMEOUT, APACHE_REQUEST_READ_TIMEOUT | request time limits |
APACHE_LIMITED_ACCESS | removes the rule that grants access to everyone, so that access is defined elsewhere |
APACHE_HTTP2 | accepts cleartext HTTP/2 |
APACHE_INCLUDE_CONF | the files included in place of the generated virtual host |
APACHE_LOG_LEVEL | error log level |
Access and error logs go to the container's standard output and error.
Build and reaching the service
- The image is built from the connected repository: the codebase is copied into the image at
/var/www/html. Files are served from the built image, so a change needs a new build and deployment. - Other services reach it over HTTP on port 80 at the app service's name inside the environment.
Check the result
httpd -Sprints the virtual host in effect;httpd -tchecks the syntax.curl -sI localhost/.healthzreturns 204 from inside the container.
Обзор
Технический профиль Apache HTTP server
Версии
Репозиторий исходного кода
Публичный Helm-чарт
Стеки
Стеки, в которые входит Apache HTTP server
CI/CD
Сборка Apache HTTP server из Git-репозитория
HTML boilerplate
Используйте его как есть или клонируйте в свой Git-аккаунт.
wodby/html-boilerplateCI-провайдеры
StackMaster CI встроен в платформу: пайплайн описывается в файле .wodby/pipeline.yml в репозитории. Для подключённого репозитория те же шаги может выполнять внешний CI-провайдер с помощью StackMaster CLI.
Реестры контейнеров
Собранные образы по умолчанию попадают в StackMaster Registry или во внешний реестр, подключённый как интеграция.
Переменные окружения из интеграций
Интеграция с переменными один раз сохраняет учётные данные стороннего сервиса. Подключите её к Apache HTTP server, и StackMaster передаст их в контейнер как переменные окружения во время работы, а не при сборке образа.
Конфигурация
Конфигурация сервиса Apache HTTP server
Технические домены
Файлы конфигурации
Настройки
На основе этого сервиса