Wednesday, October 5, 2016

Installing mail (sendmail) Ubuntu 16

sudo apt-get install sendmail
And now you can send mails easy with tls enabled without any other bullshit configs

Monday, October 3, 2016

Laravel 5.3 Nginx Config

    server {
            listen 80;
            listen [::]:80;

            root /var/www/laravel/public;
            index index.php index.html index.htm;

            server_name my_app.dev;

            location / {
                    try_files $uri $uri/ /index.php?$query_string;
            }
            location ~ \.php$ {
              include snippets/fastcgi-php.conf;
              fastcgi_pass unix:/run/php/php7.0-fpm.sock;
            }

            location ~ /\.ht {
                deny all;
            }

Sunday, October 2, 2016

Reload MySql

This should work on ubuntu 18.04
sudo service mysql restart

If not you can try other commands:
sudo systemctl restart mysqld
sudo systemctl restart mysql
or

sudo service mysqld restart
sudo service mysql restart
or

sudo /etc/init.d/mysql reload
or
sudo /etc/init.d/mysql force-reload

Change Auto Increment counter in MySQL

ALTER TABLE tbl AUTO_INCREMENT=310;