Category: Linux

Install phpmyadmin on nginx

Paste this code inside the server{} code in your etc/nginx/sites-available/example.com file. location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; root /usr/share/; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; } […]

Read more

Cron Job to remove all Files older than a Specific Amount of days

In this example I’m using 90 days. But you can use whatever you would like in the place of it. It’s also set to run at the first of every month. 0 0 1 * * find /home/somehomedir/thatfolderyouwanttouse/ -type f -mtime +90 -exec rm {} +  

Read more

SSH into your Amazon instance without a KeyPair

1.  SSH into your instance. 2.  Edit /etc/ssh/sshd_config and set PasswordAuthentication to yes. One way to do this is to enter the command nano /etc/ssh/sshd_config, then scroll down toPasswordAuthentication.  Change the no to yes.  Then press Ctrl+X, and press the Y key to save and quit. 3.  Enter the command /etc/init.d/sshd reload. (for Ubuntu, enter the command reload ssh) 4.  Set your password if you haven’t already, with the passwd command. […]

Read more

Error when updating plugins by FTP “Unable to locate WordPress Content directory (wp-content).” SOLVED

Error when updating plugins by FTP “Unable to locate WordPress Content directory (wp-content).” SOLVED if(is_admin()) { add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ )); define( ‘FS_CHMOD_DIR’, 0751 ); } Hope this helps.

Read more

Configure HTTPS with Linux

. Getting the required software For an SSL encrypted web server you will need a few things. Depending on your install you may or may not have OpenSSL and mod_ssl, Apache’s interface to OpenSSL. Use yum to get them if you need them.   yum install mod_ssl openssl Yum will either tell you they are installed […]

Read more

Generate SSL Certificate for Linux

If you want to test SSL on your web server, you probably want to generate a self-signed certificate before ordering up the real one. There are three steps: – generate SSL key w/o passphrase – generate certificate request – generate self-signed certificate # cd /etc/httpd/conf # mkdir ssl.key ssl.csr ssl.crt # openssl genrsa -out /etc/httpd/conf/ssl.key/myserver.net.key […]

Read more

Can’t Create New User – /etc/passwd locked

killall -9 userdel rm -f /etc/*lock That’s it.

Read more

How to Setup Apache2 with Virtual Hosts – Easy Tutorial

What the Red Means The lines that the user needs to enter or customize will be in red in this tutorial! About Virtual Hosts Virtual Hosts are used to run more than one domain off of a single IP address. This is especially useful to people who need to run several sites off of one virtual private server. The […]

Read more

Gooseberry – An Alternative to the Raspberry Pi? Where did it go?

CPU : A10 1 Ghz overclockable to 1.5 Ghz  (1.2 Ghz highest stable overclock on android) Graphics Processor : Mali 400 MHz Operating System : Now Android 4.0 ICS Onboard Storage: 4Gb (upgradeable by Micro SD memory card- 32gb) Wifi: 802.11 b/g/n Connectivity: Ac jack, 1x 3.5mm Earphone Jack, 1x Mini Usb, 1x Hdmi Out, Micro Sd […]

Read more

Arduino vs. Raspberry Pi vs. CubieBoard vs. Gooseberry vs. APC Rock vs. OLinuXino vs. Hackberry A10

A long time ago, Earth was ruled by dinosaurs. Then they died and we began to play with Motorola HC11. These were prehistoric times, when debugging involved anoscilloscope. (Yes, I am that old.) Then Massimo Banzi invented a new single board: Arduino. And everyone was happy. At last, prototyping was easy, cheap, and fast. Then the unexpected […]

Read more