About

This basic scripts helps automating the creation of domains or subdomains.

Usage: Create a vhost

chmod +x setvhost.sh

Set the domain or subdomain

setvhost.sh —d subdomain3.example.com —u /var/www/mydir/public

or

setvhost.sh --domain subdomain3.example.com --directory /var/www/mydir/public

SSL for subdomains case

I usually use it with subdomains to which I add a wildcard certificate, which you can generate using acme.sh or certbot:

certbot certonly --manual --preferred-challenges=dns --email mail@example.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d example.com -d *.example.com

You will have to add the returned DNS record for verification.

The returned cert has to be added to the SSL part of the skeleton file ‘vhost.skeleton.conf’:

SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem

Addon domains case

In this cas you will have to add to the end of the script an SSL request. For example, when used with certbot: certbot certonly –preferred-challenges http -d example.com

Cetbot instructions: https://certbot.eff.org/

Continue reading

About

This is a basic script that allows you to add aliases to an Apache config in which HTTP & HTTPs virtualhosts have already been set. I wrote the script to automate SAAS  processing. You can, however, customize it the way you wish.

Usage

Specify in setalias.sh the main vh that will be used as reference:

vh=”/etc/apache2/sites-available/saas.example.com.conf” main=”saas.example.com”

Then run your command:

setalias.sh add saas2.example.com

or

setalias.sh remove saas2.example.com

Continue reading

If you are developing your app on Microsoft Windows and you are planning to run it on Linux, you will have to seriously pay attention to the letter casing of your inputs. This includes commands, filenames, but also database and table names since table names in MySQL are file system entries, so they are case-sensitive if their operating system is so.

Example of filenames on Linux

Example of filenames on Linux

Continue reading

Many of you have probably got some crashes on Dota2 using a Linux distribution, especially when you don’t have the right driver.

The temporary solution can be easy, you just need to reduce the Game Screen Render Quality and maybe shadow and texture quality.