Last active
September 11, 2021 10:23
-
-
Save joshuachinemezu/0ffebe3e003737887b07ecd8192ffad5 to your computer and use it in GitHub Desktop.
Process for configuring domain wildcard on macos apache
This file contains 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
brew install dnsmasq | |
brew info dnsmasq | |
sudo brew services start dnsmasq | |
# For Intel: | |
nano /usr/local/etc/dnsmasq.conf | |
# For M1 chip | |
nano /opt/homebrew/etc/dnsmasq.conf | |
# Edit dnsmasq configuration, and add a line at the end of the file | |
conf-file=/Users/your_user_name/.dnsmasq/dnsmasq.conf | |
mkdir .dnsmasq | |
# - We create a new configuration file to manage example.local and *.example.local domains. | |
nano /Users/your_user_name/.dnsmasq/dnsmasq.conf | |
# - Add to to new configuration | |
# example.local will be resolved as 127.0.0.1, including subdomains | |
address=/example.local/127.0.0.1 | |
listen-address=127.0.0.1 | |
sudo brew services stop dnsmasq | |
sudo brew services start dnsmasq | |
# Edit /etc/apache2/httpd.conf | |
# Uncomment the following: | |
LoadModule proxy_module libexec/apache2/mod_proxy.so | |
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so | |
# Modify macOS network configuration | |
# - Edit macos dns server | |
127.0.0.1 | |
10.12...[your system internet ip] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment