Even though the sound of hosting a static website entirely out of Amazon s3, it has a catch. You can only host subdomains there (including www.example.com, cdn.example.com, images.example.com etc assuming your primary domain name is example.com) but not “apex domain” like example.com
I had an idea of redirecting the example.com traffic to one of my VPSes and then redirecting via .htaccess or PHP to www.example.com at which point www is already hosted on s3
Maintaining a shared hosting server is a full time job but tools and proper checks and balances can help make this burden lot less. I manage a shared hosting server for one of my friends and numerous times the scripts that people have installed over on their websites have vulnerabilities and hackers exploit it to upload stuff that mass-email or do other nasty stuff. Luckily, most of these exploits have common patterns like files names or other signatures that make them traceable (most of the time the so called hackers are just kiddy scripts)
Create a file and put this in it
find /home -name 'paypal.com*' | mail -s '[Woodcrest] Phishing Alert!' email@example.com
find /home -name 'rout.php' | mail -s '[Woodcrest] Phishing Alert - Mail Bomber!' firstname.lastname@example.org
This is a small script that finds specific named scripts in the /home directory (mostly cPanel servers). You can put this in the crontab to do a scan every x hours or so.
Have any questions or comments? feel free to post them below!
SELINUX is a security feature on CentOS but some software such as SolusVM will require that SELINUX be disabled
Installation log : /tmp/install.log
Add this slave to your SolusVM master using the following details:
ID Key .......... : ABC
ID Password ..... : XYZ
IMPORTANT!! You need to setup a network bridge before you can use KVM on this server.
Please see the following link: http://wiki.solusvm.com/index.php/KVM_Network_Bridge_Setup
Please set SELINUX=disabled in /etc/selinux/config before rebooting.
Thankyou for choosing SolusVM.
1) Edit /etc/selinux/config using your favourite editor
[root@kvm ~]# nano /etc/selinux/config
and set SELINUX=disabled
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
Fix it by doing this
root@beta:~# rm -fr /etc/php5/conf.d/sqlite.ini
Because this extension does not exist, you can verify it by running this, you will see that there is already sqlite3.ini file there
root@beta:~# ls -lh /usr/lib/php5/20090626+lfs/ | grep sqlite
Gee. It has been a while since I’ve last written here, and it will be a while again for my next post as I will be on holidays from next Monday (visiting families in Hong Kong and Taiwan). Let me share one small utility program that I wrote quite a while ago.
We all know that the Linux command free(1) is pretty useless inside an OpenVZ VE, even those with meminfo virtualised. So I basically wrote this little util to grab the data from the dreadful user_beancounters and format them into something useful. It’s written in C and only depends on libc so it’s pretty light weight. It also does a little bit of analysis instead of just dumping the data, which I will explain later on.