How to Globally Block IP addresses in Apache

Posted by on Jun 13, 2016 in Servers | 0 comments

Spammers are everywhere. Even though it's a cat and mouse game it feels so good when we can block them :) This tutorial assumes that you have root access to the server. This example is tested on Ubuntu but should work for any apache installation. Steps Create a file called /etc/apache2/conf-available/00_block_ips.conf with the following contents. ErrorDocument 403 "The content is not available. If you think this is an error contact us via domain.com" # Global ip blocklist <Directory "/var/www/"> deny from 1.2.3.4 # some explanation </Directory> Enable the cofig file. a2enconf 00_block_ips We file starts with 00 so it's one of the first conf files to be loaded. You should see something like this. Enabling conf 00_block_ips. To activate the new configuration, you need to run: service apache2 reload Reload apache conf service apache2 reload Feel free to customize the text in the quotes after ErrorDocument 403 so people who were accidentally blocked can do something about it. If you want to temporarily disable the ip block do this a2disconf 00_block_ips service apache2...

Read More

How to Navigate Between WordPress Pages, Posts, WooCommerce Products Like a Pro

Posted by on Apr 15, 2016 in WordPress Tips | 0 comments

Managing content is a must nowadays. It is important to share knowledge and especially if you want to attract the right customers. Even though it takes only a few clicks to get to another page or post these extra steps can break your flow. Studies show that when you get interrupted it can take 15 minutes if not more to get back to where you were. Since you want to be super effective here a free plugin called Orbisius Quick Nav allows you to quickly switch between pages, posts, WooCommerce products, orders and other custom post types with ease. Even if you have many pages or products it has a filter that simplifies the search. Download the plugin from WordPress.org https://wordpress.org/plugins/orbisius-quick-nav/ Setup WordPress site in seconds? No way! Don't believe me? Visit qSandbox for more...

Read More

How to Compile LFTP from Source

Posted by on Feb 14, 2016 in Howto | 0 comments

Download the latest version from http://lftp.yar.ru/ apt-get install -y gcc build-essential automake readline-common libreadline6-dev pkg-config libgnutls-dev ncurses-dev I've run into many errors during the configure process but this GitHub ticket helped me https://github.com/lavv17/lftp/issues/58 Untar/unzip and then ./configure make make check make install make clean make distclean Errors I've run into. DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS" configure: error: in `/.../lftp-4.6.5': configure: error: The pkg-config script could not be found or is too old.  Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. configure: error: Package requirements (gnutls >= 1.0.0) were not met: No package 'gnutls' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. configure: error: Package requirements (gnutls >= 1.0.0) were not met: No package 'gnutls' found lftp_tinfo.cc: In function âvoid init_terminfo()â: lftp_tinfo.cc:53:33: error: âsetuptermâ was not declared in this scope if(setupterm(NULL, 1, &errret) == ERR) ^ lftp_tinfo.cc:53:38: error: âERRâ was not declared in this scope if(setupterm(NULL, 1, &errret) == ERR) ^ lftp_tinfo.cc: In function âconst char* get_string_term_cap(const char*, const char*)â: lftp_tinfo.cc:71:63: error: âtigetstrâ was not declared in this scope const char *ret = tigetstr(const_cast<char *>(terminfo_cap)); ^ make[1]: *** [lftp_tinfo.lo] Error 1 make[1]: Leaving directory `/var/www/vhosts/qsandbox.com/users/3/2/qsu32/sites/postpartner2016.qsandbox.com/lftp-4.6.5/src' make: *** [all-recursive] Error 1 Do you use test/staging sites? Visit qSandbox for more...

Read More

How to change WordPress permalinks using wp-cli

Posted by on Oct 30, 2015 in Web Development | 1 comment

Here is how to get or set WordPress permalinks using WP-CLI wp option get permalink_structure wp option update permalink_structure '/%postname%' Success: Updated 'permalink_structure' option. The following command was supposed to set the proper permalink structure, however, I noticed that it also prepends index.php to the supplied stucture. Let's see if it's a bug or a feature https://github.com/wp-cli/wp-cli/issues/2184 wp rewrite structure '/%postname%'     Do you need a quick way (seconds!) to set up a test WordPress site? Then you need to check out qSandbox...

Read More

Several Important questions to consider when looking for your next server

Posted by on Jul 16, 2015 in Web Development | 0 comments

One of our SaaS apps is qSandbox (setup WordPress test sites in seconds) which was growing steadily and started hitting some limits. It was time to look for another server. Here are the questions I needed answers to in order to consider the VPS or dedicated hosting provider. I am sure there are other important questions which you can add in the comments below the post. How is the upgrade handled? Instant or within day Cancellation notice? Instant or 1 month Are there any backups? How often do they run? daily, weekly, monthly etc. If there is a need can you make sure I get another server at the same location (data centre) but not on the same host? ... and the most important one is what is the inode limit (especially for VPSs)? Today I ordered a VPS from 1and1 (XL) with nice specs. It's good that I did only the basic security stuff and started transferring sites. I was planning on installing the other packages later. Because of that I learned that 1and1's VPS inode limit is at 750 000. I did start with rsync because the current server had very little free space and I couldn't just archive the sites folder and send it. Suddenly I started seeing some rsync errors rsync: recv_generator: mkdir "/.../qsandbox.com/sites/" failed: Disk quota exceeded (122) *** Skipping any contents from this failed directory *** I called 1and1 support to find out that that's their limit and I had to cancel. It didn't work for me but if your app can run below that limit it's great. To find out what is the current inode limit type the following command. [root@qsandbox2 slavi]# df -i Filesystem      Inodes   IUsed  IFree IUse% Mounted on devtmpfs        210186     309 209877    1% /dev tmpfs           212657       1 212656    1% /dev/shm tmpfs           212657     263 212394    1% /run /dev/vda1      3,932,160 2,943,382 988,778   75% / tmpfs           212657      12 212645    1% /sys/fs/cgroup tmpfs           212657       1 212656    1% /media I used these parameters for the rsync command. rsync -avuz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --port 22 /var/www/vhosts/qsandbox.com user@10.20.30.40:/home/user/qsandbox I specifically passed the port as some of the servers run on different ports. I was curious to see what are the limits of my other staging server provided by BoltVM . I was so surprised to see that their inode limits are pretty high for a low end VPS ($20/year)! If you're looking for an affordable VPS that you can use as staging server give BoltVM a try. slavi@usw1:~$ df -i Filesystem        Inodes  IUsed    IFree IUse% Mounted on /dev/simfs     100,000,000 209,198 99,790,802    1% / none              131072     57   131015    1% /dev none              131072      1   131071    1% /sys/fs/cgroup none              131072     67   131005    1% /run none              131072     ...

Read More
Ooops! We broke Child theme creator plugin & we've pushed a new version. If your site is still broken here's a video how to fix it  Let us know if you need help with the fix. We'll fix your site at no additional cost.