Skip to content

Tag: apache

ACME Challenge support on all HTTP virtual hosts

To enable ACME Challenge support on all HTTP virtual hosts and avoid errors due to configuration/rewrite on generation or renewing SSL certificates from Let’s Encrypt you must configure a location alias. For Apache: Alias /.well-known/acme-challenge/ /var/www/default/.well-known/acme-challenge/ <Directory “/var/www/default/.well-known/acme-challenge/”> Options None AllowOverride None ForceType text/plain RedirectMatch 404 “^(?!/\.well-known/acme-challenge/[\w-]{43}$)” </Directory> For Nginx: location “/.well-known/acme-challenge” { allow all;…

How to apply restrictions per virtualhost in apache

If you are running apache on MPM Prefork, you can apply php restrictions for security or additional settings such as memory limit. Also, you can disable functions or php engine per directory or virtualhost. Standard virtualhost example: <VirtualHost *> DocumentRoot /home/tex/www/example.com ServerName example.com ServerAlias example.com ServerAdmin admin@example.com ErrorLog ${APACHE_LOG_DIR}/example.com-error_log CustomLog ${APACHE_LOG_DIR}/example.com-access_log combined </VirtualHost>   Virtualhost…