Nginx wordpress fancy URL or permalink fixing

If your wordpress is installed in the root directory i.e. yourdomain.com, you can use the following directives-

location / {
try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}

Or if your wordpress is installed inside a sub-directory the directive will be a bit different-

location /test/site1 {
try_files $uri $uri/ /test/site1/index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /test/site1/wp-admin$ $scheme://$host$uri/ permanent;

Share

Reset the root password in Debian or Ubuntu

In order to boot into the recovery mode on Debian or Ubuntu, hold down SHIFT key after powering on your Linux machine. You will then be presented with GRUB menu. Select “recovery menu” option by pressing down arrow key. Do not press ENTER at this point, but rather press “e” key to enter edit mode.

You will see “GRUB” edit screen where you can edit GRUB boot parameters. Move your cursor to the line starting with “linux /boot/vmlinuz-…….”, and go to the end of that line. Append “init /bin/bash” right there, as shown below.

Then press Ctrl+X to proceed. After all subsequent booting sequence is over, you will finally get a root prompt.

In the recovery mode, the root partition is mounted as read-only by default, and so you cannot change the root password as is. In order to be able to reset the root password, you need to re-mount the root partition as read-write.

First, find out what the root partition of your system is, by using “fdisk -l” command.

As shown in the screenshot above, the partition marked with “*” under “Boot” column is the root partition of your system (e.g., /dev/sda1).

Remount the root partition as read-write, and finally reset the password, using passwd command.
$ mount -o remount,rw /dev/sda1 /
$ passwd

Share

How to clear the yum cache

When a package is downloaded, installed and is removed there is a chance that the package may still be saved/stored in the yum’s cache. So to clean all the cached packages from the enabled repository cache directory, login as root and execute the following:

yum clean packages

To purge the old package information completely, execute the following command:

yum clean headers

To clean any cached xml metadata from any enabled repository, execute the following

yum clean metadata

If you wish to clean all the cached files from any enabled repository at once, execute the Following command:

yum clean all
Share

Resetting CentOS 5 Root Password

If you have forgotten the root password it is possible to set a new one as follows:

  1. Interrupt the boot at the GRUB stage and boot to runlevel 1, AKA single user mode.
  2. Interrupt GRUB by typing a character such as "space" then append to the kernel line by typing "a",
  3. backspacing through "rhgb quiet" and appending " 1<enter>".
  4. This will give you a root shell and not a login prompt. From there you can use the "passwd" command to set a new root password.

Other user passwords can be reset, and other administrative tasks can be performed as well. Exiting the single user root shell will boot to the multi-user mode defined in /etc/inittab.

Share

Configure NFS shares in Openfiler

In this article I’ll explain how-to configure a NFS share in Openfiler and then add it as a datastore to your vSphere servers. I’ll take for granted that you already have an Openfiler server up and running.

1 – Enable NFS service

As always point your browser to https://<openfiler_address&gt;:446, login and from the main screen go to the Services tab and enable the NFSv3 service as shown below.
Share

Install Openmediavault On Debian Squeeze

Introduction

This guide is for people that have used the Debian Squeeze Standard Installation or Debian Squeeze Gnome Installation guide to install Debian onto their microserver. If you're looking to install OpenMediaVault as a standalone system then see install OpenMediaVault instead.
Prerequisites
Debian Squeeze installed on your microserver

Installation

Configuring The Sources
If you're on Gnome then start the Root Terminal
Type: nano /etc/apt/sources.list to edit your package source file
At the bottom of the file add all of the following:

# Deb Multimedia
deb http://www.deb-multimedia.org squeeze main non-free
deb-src http://www.deb-multimedia.org sid main

Read more

Share

Setup Software RAID for Windows Server 2003

Please make sure before this installation, you will need 2 identical hard disk with same space connected to the server. But the truth is, you don’t need to same hard disk with the same space amount, but as long as you partitioned the space equally then it would be good as well. But for beginner, it is better to get a hard disk that got the same space quantity, less percentage that you would get yourself confused.
Below are the steps on how to enable the Software RAID inside Windows Server 2003:
 
1) You may follow the initial windows setup here:
http://www.iprobot.net/windows-tutorial/how-to-install-windows-server-2003/
 
2) After the installation has finished, click on Start button and right-click on My Computer. Select Manage and click on it:
 

 
3) Next is to select Disk Management:
Share

Install Openmediavault On Debian Squeeze

OpenMediaVault is the next generation network attached storage (NAS) solution based on Debian Linux. It contains services like SSH, (S)FTP, SMB/CIFS, DAAP media server, RSync, BitTorrent client and many more. Thanks to the modular design of the framework it can be enhanced via plugins.

Prerequisites

Debian Squeeze installed on your server.

Installation

Configuring The Sources
If you're on Gnome then start the Root Terminal
Type: nano /etc/apt/sources.list to edit your package source file
At the bottom of the file add all of the following:
# Deb Multimedia
deb http://www.deb-multimedia.org squeeze main non-free
deb-src http://www.deb-multimedia.org sid main

# OpenMediaVault
deb http://packages.openmediavault.org/public omnius main
Press CTRL+X to exit
Press Y when prompted if you want to save the modified buffer
Press ENTER on File Name to Write to overwrite the existing file
Type apt-get update to fetch package lists from the sources we just added
Type apt-get install deb-multimedia-keyring to install the public keys for the Deb Multimedia repository
Type apt-get install openmediavault-keyring to install the public keys for the OpenMediaVault repository
Type y if you're asked if you want to install the packages without verification

Read more

Share