19 Aug 2026

Bitrix multisite: subdomains on Mac

Aliases, wildcard, and sync vhosts for several sites in one database.

Corporate Bitrix often means several sites in one codebase: shop.client.ru, b2b.client.ru, separate admin. Production uses wildcard DNS and nginx. Locally, MacFullStack mirrors that with aliases, wildcard, and the correct docroot.

Basic Bitrix setup: /blog/bitrix-na-mac.

What to configure

  1. Docroot — real Bitrix folder (not just archive root); see /cms.
  2. Primary domainclient.localhost (or a custom zone in Settings → Domains).
  3. Aliases / subdomainsb2b.client.localhost, admin.client.localhost on the same project.
  4. Wildcard — for “any subdomain → one docroot” (WP Multisite-like); see /help/multisite.
  5. After changes — Sync vhosts and Health (orange hosts → sync hosts).

nginx instead of .htaccess

Native nginx does not read .htaccess. MacFullStack emits Bitrix rewrite/security rules; for multisite, every hostname must be in the vhost or the “second” site 404s while the main works.

Database and constants

  • One MySQL, multiple SITE_ID — like hosting; import via Tools → Databases.
  • Fix site URLs in .settings.php / dbconn.php for local domains.
  • HTTPS via mkcert, port :8443 — watch Bitrix redirects.

Common issues

Issue Fix
Second site shows the main one Aliases/wildcard + sync vhosts
502 after import Docroot, php-fpm, PHP version
Broken CSS /bitrix/ paths and mixed http/https

502/403 checklist: /blog/502-403-lokalno. Domains: /blog/domeny-i-multisite.

MacFullStack

Try it on your Mac

Free — one PHP project and core stack. Pro unlocks Next/Django, Postgres, Share, and unlimited projects.

Download Pro Teams