Allow Remote Connection
To topAuthentication protocol
To topALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
Install Lampp the easy way
To topsudo apt update
sudo apt install tasksel
sudo tasksel install lamp-server
Up Subdomain / vhost / domain / website / server
To topsudo a2ensite example.com
sudo service apache2 restart
Apache2 Config
To topsudo 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
To topsudo 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
To topsudo nano /etc/hosts
Restart MySQL Service, without interrumping current tasks
To topsudo systemctl restart mysql
Restart Apache, without interrumping current tasks
To topsudo systemctl restart apache2.service
Adjust timezone
To topsudo 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
To topHow To Secure Apache with Let’s Encrypt on Ubuntu 14.04 |…
How To Secure Apache with Let’s Encrypt on Ubuntu 16.04 |…
Git
To topHow To Install Git on Ubuntu 16.04 | DigitalOceanDigitalOcean
Setup
To topInitial Server Setup with Ubuntu 16.04 | DigitalOceanDigitalOcean
Multiple virtual Hosts
To topHow 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
To topI 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
To topLook & 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
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.
[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
To topRun 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
To topOption A
To top- Reinstall existing certificate
- Update
.conf
files - Create public dir
Option B (If above fails)
To top- 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