Few days ago I had to deal with this error when I wanted to restart my Nginx Web Server:

/etc/init.d/nginx restart
Stopping nginx:                                            [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]

After some internet searches, I’ve found the fix:

fuser -  Is displaying the PIDs of processes that are using the specified files or file systems.

Then you need to search what PID (process ID) is using the 80 port by typing the following command:

fuser -n tcp 80
80/tcp:                459   465   477

Now just kill those processes: Continue Reading…

This is how you can enable hidden files(.htaccess) in ProFTPd.

Open proftpd.conf file and change ListOptions from -l to -a. Or if doesn’t exists add ListOptions -a to your proftpd.conf file.

nano /etc/proftpd/proftpd.conf

Change:

ListOptions "-l"

to:

ListOptions "-a"

Now restart proftpd and it’s done.

/etc/init.d/proftpd restart
Stopping ftp server: proftpd.
Starting ftp server: proftpd.

netselect-apt downloads a list of all mirrors from the Debian website. Then checks which server is nearer to your server. And finally it creates a sources.list file in your current directory.

In this guide I will show you how to install and use netselect-apt to select the fastest mirror for you.

1. Install netselect-apt:

apt-get install netselect-apt

2. How to use netselect-apt:

netselect-apt squeeze

After few seconds you will get the answer:

The fastest server seems to be:
http://ftp.lug.ro/debian/

Writing sources.list.
Done.

3. Enable the sources.list that you just created:

Just copy the sources.list netselect-apt created to your  /etc/apt/ folder and run apt-get update

The following Iptables rules will block all Torrent traffic on your server:

Log all torrent blocked traffic:

iptables -N LOG > /dev/null 2> /dev/null
iptables -F LOG
iptables -A LOG -j LOG --log-prefix "LOG"
iptables -A LOG -j DROP

Torrent block rules:

iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j LOG
iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j LOG
iptables -A FORWARD -m string --algo bm --string "peer_id=" -j LOG
iptables -A FORWARD -m string --algo bm --string ".torrent" -j LOG
iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j LOG
iptables -A FORWARD -m string --algo bm --string "torrent" -j LOG
iptables -A FORWARD -m string --algo bm --string "announce" -j LOG
iptables -A FORWARD -m string --algo bm --string "info_hash" -j LOG

nginx-black-logo

This is another way to run phpMyAdmin on Nginx.

1. Install phpMyAdmin on Nginx:

apt-get install phpmyadmin

When the pop up shows up, select neither Apache or Lighttpd. You don’t need any to run phpMyAdmin on Nginx.

Screen Shot 2013-03-29 at 12.34.34 AM

And say select NO for the Configure database for phpmyadmin with dbconfig-common:

Screen Shot 2013-03-29 at 12.34.20 AM

2. Configure phpMyAdmin to work with Nginx:

Add the followings to /etc/nginx/sites-available/default file after the server{ statement: Continue Reading…

Page 4 of 6712345678910...2030405060...Last »