Add nginx configuration for Maho environment type - #122
Open
fballiano wants to merge 1 commit into
Open
Conversation
fballiano
force-pushed
the
add-maho-environment
branch
from
July 20, 2026 15:26
ba76b31 to
7575744
Compare
This was referenced Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the nginx vhost template for the new
mahoenvironment type submitted in wardenenv/warden#941.Maho is an open source ecommerce platform forked from OpenMage / Magento 1 and modernized with PHP 8.3+ support. I am its maintainer.
The template is based on
magento1.conf:/index.phpX-Rewrite-Url/X-Original-Urlheader blanking inherited from Magento 1MAGE_RUN_CODE/MAGE_RUN_TYPEparams for multi-store setups (same convention asmagento1.conf: the variables are not defined by the base server block, so they ship commented and users define and enable them per project when needed)The
/apirouting follows Maho'spublic/.htaccess, which is the reference implementation:/api/rest/v2/*torest.php(modern REST API, Symfony API Platform)/api/rest/*toapi.php?type=rest(legacy Magento 1 REST, kept for compatibility)/api/soap,/api/v2_soap,/api/xmlrpc,/api/jsonrpctoindex.php(legacy protocol dispatchers)/api/*(GraphQL, OpenAPI docs) torest.phpUnlike Magento 1, Maho's webroot is the project's
public/directory (handled viaNGINX_PUBLIC=/publicin the environment definition), so themagento1.confdeny rules forapp/,lib/,var/etc. are not needed here: the application code lives outside the webroot. Deny rules for dotfiles and backup/config/source files are kept.Verified by mounting this file into the published
wardenenv/nginx:1.27image withNGINX_TEMPLATE=maho.confandNGINX_PUBLIC=/public, running the image's envsubst step andnginx -t(syntax ok, test successful).Companion PRs: