Sometimes a redirect from the root of the website to the subfolder is needed. The following .htaccess rules achieve just that…
Just like in real-life construction and rebuilding, you sometimes need to demolish and rebuild an existing website. And you probably want to do this behind a very nice and safe wall.
The wall, in our case, will be a “currently rebuilding. please visit soon” index.html file. If directory index priority is set to html then php, now the index.html file will be our visible website and hide the soon-to-be-demolished php-based website.
This is an extract from WD’s own “Model Number Format for OEM and Distribution Channels” document – describing what each letter/number of a WD hard drive model number refers to.
It’s great that Linux nowadays supports all the power management features available on computers. But it’s odd that beside the buttons to trigger standby/hibernate – which are only available in a graphical interface – there are no simple console commands to put the computer to sleep or into hibernation.
I recently attempted to install a fresh CentOS on a pair of recycled (previously used in a different linux sistem) hard disks.
Of course I got the classical message that the disks already had RAID metadata on them: “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda”
I got a Linksys WRT54GL v1.1 router that somewhat worked and somewhat didn’t: it booted alright (no led errors), responded to ping on its default IP (192.168.1.1), bot other than that, it did not respond on the web interface, nor telnet/ssh, nor dhcp.
I tried the 30/30/30 reset , tried TFTP recovery – nothing worked.
As it had the original Linksys firmware, at this point it was either a hardware failure or the only recovery course would be the JTAG reflash.
Sometimes it may be necessary to block access to some/all services offered by a server without shutting it down or disconnecting it from the network, at the same time displaying a message for users accessing websites on it.
You might have often encountered the “Argument list is too long” message when trying to rm -rf large amount of files. This happens often on large servers when trying to clean up the tmp folder. This is because the rm command has a pretty low count of supported parameters (filenames) while the tmp folder can become host to a terribly high number of files (millions in a period of years).
As some of you may already know, vzdump is not included in the openvz repository for CentOS. If you need to use vzdump, you have to download its source and compile it yourself, unless you’re already using some VPS control panel that has it bundled.
Luckily, for all those who don’t use control panels and don’t want to compile vzdump themselves, there’s a quick workaround. SolusVM includes it in its repository, which apparently can be used even if you don’t have SolusVM installed on that particular server.
One of the tricks I’ve frequently had to use was to discover all the recently modified files within a hosting account (very useful information in case the account was recently hacked and changed files need to be restored).
This is my preferred list of modules for iptables on OpenVZ kernels (set in /etc/vz/vz.conf): ## IPv4 iptables kernel modules to be enabled in CTs by default IPTABLES=”ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp ipt_owner ipt_REDIRECT” ## IPv4 iptables kernel modules …
By default, grub only instals itself on the first hard drive, no matter how many members there are in the RAID1 array.
One can easily install the grub bootloader on additional members of the RAID using the setup (hdX)…