debops / debops/debops

[debops.debops.apache] fully customizable Alias Directive

Open
#1,769 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jinja
Stars
1.4k
Forks
379
Avg merge
4d 18h
Merged PRs (30d)
8

Description

Hello,

Current, with

{% macro get_alias(url_path, fs_directory) %}{# [[[ #}
Alias {{ url_path | quote }} {{ (fs_directory + ("/" if (fs_directory[-1] != "/") else "")) | quote }}
{% endmacro %}

Example:

apache__vhosts:
  - name: test.local
    document_root: /var/www/html
    alias: /cgi /var/www/cgi

expect result:

   Alias /cgi /var/www/cgi

actual result:

  Alias /cgi /var/www/cgi /var/www/html

we are unable to have custom file path. It is always fs_directory. It is really inconvenient.
This Alias Directive https://httpd.apache.org/docs/2.4/mod/mod_alias.html#alias shows that some examples

Alias "/image" "/ftp/pub/image"
Alias "/icons/" "/usr/local/apache/icons/"

It seems it also lacks of support multiple Alias
Can we have an improvement for this?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the get_alias(url_path, fs_directory) macro in the debops.debops.apache role templates and trace how apache__vhosts alias values are rendered. Compare the current output with the issue's single and multiple Alias examples; done means custom target paths render without automatically appending document_root and multiple aliases are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, apache
Domain
infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.