If using the default stacks, add the following two lines in docksal.env
or docksal-local.env
.
Apache
APACHE_BASIC_AUTH_USER=user
APACHE_BASIC_AUTH_PASS=password
Nginx
NGINX_BASIC_AUTH_USER=user
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.