If using the default stacks, run these commands (add --env=local
to add to the docksal-local.env
file):
Apache
fin config set APACHE_BASIC_AUTH_USER=user
fin config set APACHE_BASIC_AUTH_PASS=password
Nginx
fin config set NGINX_BASIC_AUTH_USER=user
fin config set NGINX_BASIC_AUTH_PASS=password
If using custom configuration, modify your .docksal/docksal.yml
or .docksal/docksal-local.yml
.
Add the following two lines to the web
service and run fin project start
to apply changes:
Apache
web:
...
environment:
..
- APACHE_BASIC_AUTH_USER=user
- APACHE_BASIC_AUTH_PASS=password
...
Nginx
web:
...
environment:
..
- NGINX_BASIC_AUTH_USER=user
- NGINX_BASIC_AUTH_PASS=password
...
Was this page helpful?
Thanks for the feedback. If you have a specific, answerable question about how to use Docksal, ask it in Discussions on GitHub. Open an issue if you want to report a problem or suggest an improvement. You can also contribute changes to this page using the link in the top right corner.