This is a simple vhost configuration generator for Apache2+Nginx+Certbot private webhosting stack.
add-apt-repository ppa:certbot/certbot
apt-get install nginx python-certbot-nginx
/etc/init.d/nginx stop
/opt/farm/ext/farm-roles/install.sh php-apache
apt-get install php-mbstring php-curl php-xml
touch /var/www/.subdirectories
Change Listen 80
to Listen 81
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
a2dismod mpm_worker
a2dismod mpm_event
a2enmod php7.2
a2enmod headers
a2enmod rewrite
a2enmod remoteip