Allow Remote Connection
Authentication protocol
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
Install Lampp the easy way
sudo apt update
sudo apt install tasksel
sudo tasksel install lamp-server
Up Subdomain / vhost / domain / website / server
sudo a2ensite example.com
sudo service apache2 restart
Apache2 Config
sudo nano /etc/apache2/apache2.conf
Change From:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
to:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Adjust Mysql
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Change from:
bind-address = 127.0.0.1
to:
# bind-address = 127.0.0.1
Setup Virtual Hosts
Edit hosts
sudo nano /etc/hosts
Restart MySQL Service, without interrumping current tasks
sudo systemctl restart mysql
Restart Apache, without interrumping current tasks
sudo systemctl restart apache2.service
Adjust timezone
sudo timedatectl set-timezone America/Mexico_City
How To Set Timezone and NTP Sync on Ubuntu [Quickstart] |…- Restart MySQL & Apache:
sudo service apache2 restart; sudo service mysql restart
Let’s Encrypt
How To Secure Apache with Let’s Encrypt on Ubuntu 14.04 |…
How To Secure Apache with Let’s Encrypt on Ubuntu 16.04 |…
Git
How To Install Git on Ubuntu 16.04 | DigitalOceanDigitalOcean
Setup
Initial Server Setup with Ubuntu 16.04 | DigitalOceanDigitalOcean
Multiple virtual Hosts
How To Set Up Apache Virtual Hosts on Ubuntu 16.04 | DigitalOceanDigitalOcean
¿Cómo configurar Virtual Hosts de Apache en Ubuntu 16.04? |…
Config Hosts
$ sudo gedit /etc/hosts
Swap Memory
I found the solution,
seems that our droplets doesnt have enogh memory some times and mysql cant allocate what it needs and crash, so we need to create a swap space to help this.
this is what I did:
On the command line
root@myserver:~# dd if=/dev/zero of=/swap.dat bs=1024 count=512k
root@myserver:~# mkswap /swap.dat
root@myserver:~# swapon /swap.dat
root@myserver:~# vim /etc/fstab
vim is started to edit, add the following to the end of /etc/fstab file
/swap.dat none swap sw 0 0
Then, edit the mysql config file
root@myserver:~# vim /etc/mysql/my.cnf
And add this under [mysqld]
innodb_buffer_pool_size=64M
Finally reload mysql
root@myserver:~# service mysqld reload
Swap Memory
Look & Feel
Move “Show Applications” button to top of the Dock in Ubuntu 18.04 and 18.10
How to Install LibreOffice 6.0 on Ubuntu 16.04 LTS and Above – OMG! Ubuntu!
How to install LibreOffice 6.2 on Linux Mint, Ubuntu,…
64 bit – How do I create a 32-bit WINE prefix? – Ask Ubuntu
How do I install the Firefox Developer Edition?
Download from Mozilla Firefox Developer Edition webpage. Extract it with file-roller
and move the folder to its final location. A good practice is to install it in /opt/
or /usr/local/
.
Once you moved the files to their final location (say /opt/firefox_dev/
), you can create the following file ~/.local/share/applications/firefox_dev.desktop
to get a launcher with an icon distinct from normal Firefox.
[Desktop Entry]
Name=Firefox Developer
GenericName=Firefox Developer Edition
Exec=/opt/firefox_dev/firefox %u
Terminal=false
Icon=/opt/firefox_dev/browser/chrome/icons/default/default128.png
Type=Application
Categories=Application;Network;X-Developer;
Comment=Firefox Developer Edition Web Browser.
To mark the launcher as trusted, make it executable:
chmod +x ~/.local/share/applications/firefox_dev.desktop
To launch it, navigate to ~/.local/share/applications/ using your “Files” application (ensure you turn on hidden folders), then double-click firefox_dev.desktop. Alternatively, search for Firefox Developer
, and simply run the firefox
binary, and voilà.
Note that, when you install manually, the F.D.E. does not have the unity global menu by default.
Create launcher icon for Navicat
[Desktop Entry]
Name=Navicat
Comment=Database Admin Tool
Exec=/bin/sh "/opt/navicat/start_navicat"
Icon=/path/to/icon
Terminal=false
Type=Application
Categories=Wine;
StartupNotify=true
chmod +x ~/.local/share/applications/navicat.desktop
Set Up the SSL Certificate
Run the certbot
command like so, where example.com is your domain:
sudo certbot --apache -d example.com
If you want to install a single certificate that is valid for multiple domains pass the bare top-level domain name as first in the list, followed by any additional subdomains or aliases:
sudo certbot --apache -d example.com -d www.example.com
Install certificate in subdomain
sudo certbot --apache -d sub.sub2.domain.LTD
Could not reverse map the HTTPS VirtualHost to the original
Option A
- Reinstall existing certificate
- Update
.conf
files - Create public dir
Option B (If above fails)
- Create/update
/etc/apache2/sites-available/domain.ltd.conf
<VirtualHost *:80>
ServerAdmin admin@adlnetworks.com
ServerName domain.ltd
DocumentRoot /var/www/domain.ltd/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =domain.ltd [OR]
RewriteCond %{SERVER_NAME} =www.domain.ltd
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
- Create/update
/etc/apache2/sites-available/domain.ltd-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin admin@adlnetworks.com
ServerName domain.ltd
ServerAlias www.domain.ltd
DocumentRoot /var/www/domain.ltd/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/domain.ltd/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.ltd/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
- Enable sitessudo a2ensite domain.ltd; sudo a2ensite domain.ltd-le-ssl;
- Restart Apache2
sudo systemctl restart apache2
apache2 – Enabling .htaccess file to rewrite path (not working) – Ask Ubuntu
10.04 – How do I enable the mod_rewrite Apache module for…
How to install PHP intl extension in Ubuntu 14.04 – Stack Overflow
Configure Xdebug + PHP 7 + Nginx + Ubuntu 17.10 – http://blog.thamaraiselvam.com