This is how!
Edit a .conf (in my case I have a redirects.conf) for this kind of redirects….
And add the following lines…
Redirect permanent / http://www.example.com/
and naturally restart apache! 😉
service apache2 restart
I had to enable CGI on this new recent server
sudo a2enmod cgi
sudo service apache2 restart
But I was getting a error script not found or unable to stat
[Mon Nov 30 18:00:32.380748 2015] [cgi:error] [pid 18799] [client 84.91.XXX.XXX:62545] script not found or unable to stat: /usr/lib/cgi-bin/HiPGZ23est4
I had to edit the .conf file
and add the following lines
ScriptAlias /cgi-bin/ /path_to_cgi_folder/cgi-bin/
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Allow from all
and then reload the apache configurations
service apache2 reload
Simply by tweaking apache confs and using cloudflare…
Nov 30 06:27:58 ns33XXXXX sshd: Did not receive identification string from 22.214.171.124
Nov 30 06:31:07 ns33XXXXX sshd: Connection closed by 126.96.36.199 [preauth]
Nov 30 06:35:09 ns33XXXXX sshd: Connection closed by 188.8.131.52 [preauth]
So, what does this means?
Some miscreant (surprise!) is hammering at ssh to try to find a username/password combination that gets them into the system. Probably from some botnet doing the same to who knows how many other unsuspecting victims.
This one below means ssh server waited and did not receive what it needed in a timely fashion. This is typically due to connectivity issues. In an ssh connection, the server first provides its identification string, then waits for the client to then provide its identification string. If there is a loss in connection, or the client just bails, this is what you will see in the logs.
If someone uses telnet or netcat to fetch your ssh banner, or other various scans, the logs on the server side will show this as well.
So, I went to fail2ban and increased the values!
This is my /var/log/fail2ban.log.
2015-11-30 13:11:24,144 fail2ban.filter : INFO Set maxRetry = 3
2015-11-30 13:11:24,146 fail2ban.filter : INFO Set findtime = 6000
2015-11-30 13:11:24,146 fail2ban.actions: INFO Set banTime = 6000
Invalid command ‘AuthGroupFile’, perhaps misspelled or defined by a module not included in the server configuration
sudo a2enmod authz_groupfile && sudo service apache2 restart
Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration
sudo a2enmod rewrite && sudo service apache2 restart
Some data has been copied to the new server!
The source server didn’t allowed rsync ’cause it was a cpanel environment…
wget -m -c ftp://username:[email protected]/folder
the end looks like this…
FINISHED --2015-11-27 21:41:31--
Total wall clock time: 4h 6m 50s
Downloaded: 8286 files, 12G in 3h 0m 38s (1.11 MB/s)
You need to edit your php.ini and increase the upload_max_filesize and post_max_size limit.
service apache2 restart
Cpanel custom configuration files location
then rebuild and load the cpanel apache configuration files.