web: Settings

Apache Advanced Settings

The following settings files in the project codebase can be used to override default Apache settings.

Use .docksal/etc/apache/httpd-vhost-overrides.conf to override the default virtual host configuration:

DirectoryIndex index2.html

Use .docksal/etc/apache/httpd-vhosts.conf to define additional virtual hosts:

<VirtualHost *:80>
    ServerName ${APACHE_SERVERNAME}
    ServerAlias styleguide.*
    DocumentRoot /var/www/styleguide
</VirtualHost>

<Directory "/var/www/styleguide">
    Require all granted
</Directory>

For a complete list of available features and settings see docksal/service-apache.

Nginx Advanced Settings

The following settings files in the project codebase can be used to override default Apache settings.

Use .docksal/etc/nginx/vhost-overrides.conf to override the default virtual host configuration:

  index index2.html;

Use .docksal/etc/nginx/vhosts.conf to define additional virtual hosts:

server
{
    listen 80;
    server_name test3.docksal;
    root /var/www/docroot;
    index index3.html;
}

For a complete list of available features and settings see docksal/service-nginx.

Using Different Versions

When using the default stack (a custom project stack is not defined in .docksal/docksal.yml), switching can be done via the WEB_IMAGE variable in .docksal/docksal.env, e.g.:

WEB_IMAGE='docksal/apache:2.4-2.3'

This can also be set with fin config set.

fin config set WEB_IMAGE='docksal/apache:2.4-2.3'

Remember to run fin project restart web (fin p restart web) to apply the configuration.

Use the following commands to get the list of available Apache and Nginx images:

fin image registry docksal/apache
fin image registry docksal/nginx

Use WEB_IMAGE to only switch between version (tags) of the same image. Switching between Apache and Nginx cannot be done using this approach, since the two services have different configuration variables.