Admins eHow SysAdmin Tips & Tricks

June 2, 2009

Force Download on nginx

Filed under: Nginx — Tags: , , — admin @ 9:05 pm

if you want force download on nginx for all files except images use the following config :

	listen 80;
	server_name test.localhost;
	location / {
		root /Users/vasil/test;
		if ($request_filename !~* ^.*?\.(jpg)|(png)|(gif)){
			add_header Content-Disposition: "$request_filename";

MySQL Change root password

Filed under: General,MySQL — Tags: , , , — admin @ 8:58 am

If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:

mysqladmin -u root password NEWPASSWORD

However, if you want to change (or update) a root password, then you need to use following command

mysqladmin -u root -p'oldpassword' password newpass

For example, If old password is abc, and set new password to 123456, enter:

mysqladmin -u root -p'abc' password '123456'

June 1, 2009

Turn on displaying all PHP errors

Filed under: PHP — Tags: , , , — admin @ 4:46 pm

Add the Following code at the top of your php script :

ini_set('display_errors', '1');

What affects the download speed of torrents ?

Filed under: General,Torrent — Tags: , , — admin @ 1:43 pm

Torrent is a P2P (Peer to Peer) network , means there is no central server to send data for clients , instead the clients connect to each other directly and communicate the data , in such network the speed depends on many factors despite the fact how much is your internet connection download speed.

1.Leechers/Seeders Ratio
if a torrent has many leechers (downloaders) but few seeders (uploaders) , then the speed of download would be low. I guess the reason is obvious 🙂

2.Network routes between peers
different geographic locations are connected to each other with different connection types , some with fiber optics , some with satellites , some with wireless networks and etc.
so it really matters where the seeders and leechers are located. someone in US may get 10x speed rather than someone in EU for a same torrent just because of network routes.

3.The softwares
The torrent softwares ( Torrent Clients ) have different performances , I would recommend uTorrent for best performance.

« Newer Posts

Powered by WordPress