amuck-landowner

vpsBoard contest (2/3) Round Up!

Nick

Moderator
Moderator
Hey Guys,

Well it's time we post this thread for the round up of the second competition ( http://vpsboard.com/index.php?/topic/64-vpsboard-contest-23-win-free-domains/ ).

I've added a poll with the name and link to each exclusive tutorial in the Tutorials and Guides board (located here: http://vpsboard.com/index.php?/forum/12-tutorials-and-guides/ ). Each user is allowed up to 3 votes each, please do not vote for your own.*

Feel free to discuss about which tutorials/guides you voted for and why in this thread. If you have any questions, please PM me.

*There is no hard limit. If you are seen to have more than three votes, all of your votes will be removed.

Voting will end Saturday, June 6th at 5PM EST.

Vote away!
 

acd

New Member
1. OPTIMIZE TABLE for all MySQL databases and tables. 

Does not discuss the advantages of performing table optimization and what is actually accomplished by performing this maintenance, nor does it discuss disadvantages of table optimization on large tables with a lot of delete/update activity (disk space requirements, duration of optimization during which the table is locked). This would help determine how frequently it should be performed. Still, it's a useful script. Additionally, it'd be a handy script to perform post-crash database maint on all tables in all databases if that datafree check was zapped and Optimize were swapped for Repair.

Unfortunately, as @Reece pointed out, this script is almost directly copied from another blog post and so probably does not qualify as exclusive. ( http://meinit.nl/optimize-only-fragmented-tables-mysql )

2. Disable open DNS recursion. 

It's pretty clear @TruvisT either does not understand DNS amplification attacks or he doesn't recognize their significance as a major nuisance in the internet services sphere, but his instructions are spot on; turning off open recursion is an important step in limiting this style of DDOS. He doesn't mention that it is BIND specific, but that is all cpanel supports to my knowledge, so it's accurate within the scope of cpanel.

3. WordPress with Redis caching 

This is a well constructed, unassuming tutorial that provides a marked performance advantage for very little effort, or rather, the effort has already been done for you. From my understanding of the script, it should provide an interactivity advantage over nginx+fcgi_cache because it appropriately invalidates cache pages, indeed this is not possible in fcgi_cache on demand without ngx_cache_purge (not a core module), both of which are less straightforward to configure than this guide. -1 point for not comparing to other caching solutions (memcached/varnish/nginx fcgi_cache/et.al.) and not mentioning that other dynamic page caches should be disabled for proper performance. -0.1 point for not forking the index-with-redis.php file and fixing little details in it that irked me when I read it ;). If @ElliotJ could take credit for writing the associated php integration script, this would be a top notch tutorial; as it is, it's still pretty good.

This is the blog post @ElliotJ's php scripts originate from: http://www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/

Thumbs up to @eva2000 for providing seige benchmarks for nginx fcgi_cache vs redis caching. The result was pretty expected but it's good to see the numbers. As I mentioned before, the tradeoff here is load vs cache freshness.

Again, won't vote for this one since the rule says exclusive guide.

4. KVM Host Node Quickstart 

@wlanboy has provided a well formatted, systematic and easy to follow guide for getting a basic KVM instance up and running in debian and derivatives. He takes the time to expand on some basic usage of virsh and demonstrates some screenshots of virt-manager, which in my opinion, are the easiest ways to manage KVMs short of a full-blown kvm hosting solution. I wish he'd gone further than very basic setup. Looking at his example configuration, it seems he has not attempted any of the possible optimizations from the red hat kvm optimization guide.

5. How to Contact Support, Properly. 

This article. This article is something that every new or non-technical customer needs to read once. Unfortunately, for the target audience vpsBoard.com, @EliotJ's preaching to the choir; either we're too jaded to care, or it's something we already know and do. Well intentioned, well written, but generally irrelevant. Points for effort, sir, points for effort.

6. Small HTTP proxy (+ SOCKS w/ ssh -D) 

I read this article, which could be summarized as "install polipo from apt, set listening IP to 127.0.0.1, sudo service polipo restart". It's listening on localhost so it's not moving your connection to a different routing endpoint/geographic locale, nor is it protecting your traffic from isp inspection and logging so my question was... why? @wlanboy never really addressed that in his guide. He also didn't mention polipo crashes frequently when handling 10-15 or more http 1.1 connections (anecdotal evidence only, it refuses to drop a core for me to debug :/).

The ssh -D (dynamic) port forward is a pretty useful trick, but it's more a one-liner than a guide. It doesn't discuss checking if your remote sshd supports tcp forwards ( sshd_config: AllowTcpForwarding ), configuring single port local and remote forwards or adding forwards to an in-flight ssh session, all of which together would have made for a good tutorial.

In a later reply, he does go on to explain how to add auto-updating adblock hosts lists to the polipo forbidden file, but I'm prejudiced against the ruby script that should have been a grep -v & max 7 lines of awk, sed or perl, one for each RE-replace.

7. Installing newest Ruby on your vps 

Disqualified, in my opinion. Provided example ruby script contains remote shell code execution vulnerability (and a nice xss/csrf opportunity on the next line).
 

@root = File.expand_path(File.dirname(__FILE__))
run Proc.new { |env|
path = Rack::Utils.unescape(env['PATH_INFO'])
if path == "/"
startpage = @root + "/index.html"
[200, {'Content-Type' => 'text/html'}, [File.read(startpage)]]
elsif path.start_with? "/ping/"
ip = path.split('/')[2]
result = `ping -c 5 #{ip}`
result = "<html><body><pre>#{result}</pre></body></html>"
[200, {'Content-Type' => 'text/html'}, [result]]
else
Rack::Directory.new(@root).call(env)
end
}
8. Cleanup your OpenVZ Ubuntu image 

This is a pretty good start, but I'm much more likely to refer someone to maxexcloo's minstall script, which is more comprehensive and flexible, though I don't know if that's been updated for Wheezy. Granted, it's always good to know how to do apt operations by hand, but that's better suited to the apt manual.

9. nginx + fastcgi_cache for Wordpress 

This was the most inspiring guide for me on the site. I read this, not knowing how fastcgi_cache worked so it took me a couple hours to puzzle out. The guide is also very well constructed and modular. Turning off fcgi caching is a one-line vhost config change (per vhost). Or you could set up /etc/nginx/global/{wordpress.conf,wordpress.cache.conf} as symlinks and one-command switch for all sites, if needed. It could use a fair bit of formatting cleanup for the purpose of consistency, but it's a great guide as is.

10. Install Crafty Syntax Live Help (CSLH) on Drupal 

I want to say this is a good guide. It's well structured; explaining why first, then what. It is clearly original content and as far as I can tell exclusive. Unfortunately, I have no clue what Mr. Thornton is talking about because I don't have either a copy of Drupal or CLSH Pro license.

11. Quick Online Radio 

This is another well written guide by @jcaleb, but the real benefit of this thread is the plethora of opinions and comments on how it could be done differently. Toward the end of the thread the general consensus seems to be Subsonic is easier to configure and more flexible.

12. lighttpd configuration as webserver and proxy 

@wlanboy brings us a fairly comprehensive guide to using lighttpd for various purposes. I think the only thing it might be missing is a little bit on access controls and redirect & rewrite examples and then it would cover most of the commonly used features. It's set up in an ala carte manner (as lighttpd config is prone to) which lets you pick and choose what code examples you need.
 

13. OpenVPN configuration for dd-wrt

 

This is much abridged from the guide available on dd-wrt's own wiki.

 

14. Webserver auto-restart script 

 

This is a cute (tongue in cheek) script which checks if your webserver is still webserving, and if not, kick it in the pants. Includes a cron script for 5 minute run intervals. Surprisingly, KuJoe did not capture the nginx init script output, so you might be getting mails on restart.... lots of mails to root@[..]

 

15. Basic Server Benchmarks 

 

@BK_ has written a brief primer for gauging server performance. Good for folks new to VPSes as well as those who might be having performance problems and think it might be a hardware issue. Unfortunately, he doesn't really go over how to interpret the results so it might be a little confusing if you don't know what you're looking at.

 

16. Simple Security 

 

Just what the title says, @jcaleb has a quick guide for a basic level of securing your system: setting up public keys & zapping root login for openssh and setting basic firewall rules. @365Networks adds how to do the same for dropbear

 

17. Apache2 VHost template script for Debian Derivatives 

 

@fatboy wrote in about the script he uses to quickly add vhosts to his apache2 configuration. It's a little sparse on the success checks for shell actions and it doesn't check the apache config before trying to restart the daemon, both of which are wise for a busy server and maybe a confirmation [Y/n] inquiry. Needs significant cleanup before use.

 

18. WHMCS Extended Login Tracking 

 

Here's another tutorial I'm not qualified to assess, not having developer experience with WHMCS. @Aldryic C'bo
 
Last edited by a moderator:

Aldryic C'boas

The Pony
Guessing at the number of records he's got, I'm surprised he didn't index tbllogins(clientid,date) to speed up that pruning join. There's also a slight bug in his insert statement on 'ipaddr' vs 'ip' column name . @Damian also chimed in, posting a similar solution using the client profile log.
Thanks for pointing those out - both typos/accidental exclusions in the tutorial on my part.  Updated and corrected :3 
 

Nick

Moderator
Moderator
I've been flat out lately. How about we extend this until Sunday the 16th and hopefully we'll get a few more votes?
 
Last edited by a moderator:

HalfEatenPie

The Irrational One
Retired Staff
Nick's currently in the New Zealand army (he recently joined up).  Sorry this slipped through the cracks!  We'll get this sorted out don't you worry!

Contest 3/3 is on it's way.  You just wait!
 

MannDude

Just a dude
vpsBoard Founder
Moderator
sighs

I need to dig through the old database copies and find out what happened to the results. When everythign got archived, an un-archived, some stuff got scrambled. The CVPS threads lost a ton of content (was later manually restored as two threads, painstakingly) and it looks like the poll results got wiped.

I do recall last time seeing it, there was like a 5 way tie or something. There wasn't many votes and there were a ton of options. May need to rethink of how to do this, and since NickO is away now I'll just dish out the prizes for this.

Isn't 3/3 the coding one?
No, someone else (I forget who) wanted to do a croudsourced coding project. I told them I had no problem offering it here. Though it wasn't a vpsBoard contest.
 
Top
amuck-landowner