Skip to content

[Howto]: Create apache ServerAlias for project name (without TLD_SUFFIX) #1036

@raintonr

Description

@raintonr

Have you already checked elsewhere?

What are you struggling with?

vhost-gen creates Apache config with ServerName equal to <project name>.<TLD_SUFFIX>

I'd like to create a ServerAlias which is just equal to <project name>. That is, without the TLD_SUFFIX added.

What have you tried already?

From what I can tell, as <project name> is not available for use in the vhost-get tempates. Therefore in order to use a project name within, one must copy the template to that project directory and edit it and just hard code the project name within.

What is your goal?

I actually want to do this as have DevilBox running behind a separate nginx proxy. The proxy handles requests from the outside internet to example.com, which have to be forwarded to example.com.tld_suffix within the LAN. This works great, but does not work if nginx is configured with proxy_set_header Host $http_host; - to correctly handle those Devilbox needs an alias of example.com adding.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions