permalinks /%postname%/ error 404 not found in wordpress

During the hosting migration a wordpress cms, there was a problem with permalinks and postnames, when you try to access a random categories the error 404 not found appears.

To solve the problem make sure your virtualhost looks like that.


Options +FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all

In the wordpress cms, navigate to Tools->Permalinks->Custom Structur ( /%postname%/ )

This is output generated from wordpress cms .htaccess file

BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

configure zimbra firewall howto

[root@mail ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 46.35.160.170/32 –dport 22 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 0/0 –dport 22 -j REJECT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 53 -j ACCEPT
-A INPUT -m state –state NEW -m udp -p udp –dport 53 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 110 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 443 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 25 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 143 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 993 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 389 -j ACCEPT -s 46.35.160.170/32
-A INPUT -m state –state NEW -m tcp -p tcp –dport 465 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 587 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 46.35.160.170/32 –dport 7071 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 0/0 –dport 7071 -j REJECT
-A INPUT -m state –state NEW -m tcp -p tcp -s 46.35.160.170/32 –dport 7025 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 0/0 –dport 7025 -j REJECT
-A INPUT -j REJECT –reject-with icmp-host-prohibited
-A FORWARD -j REJECT –reject-with icmp-host-prohibited
COMMIT

RAID bus controller: Dell PowerEdge Expandable RAID controller 4/Di (rev 02)

This is short example how to view raid card and installed hard drives in dell poweredge 1750 server
root@dell:~# lspci -v | grep -i RAID
04:03.0 RAID bus controller: Dell PowerEdge Expandable RAID controller 4/Di (rev 02)
Kernel driver in use: megaraid

root@dell:~# megactl
a0 PERC 4/Di chan:2 ldrv:1 batt:good
a0d0 67GiB RAID 5 1x3 optimal
a0c0t0 33GiB a0d0 online
a0c0t1 33GiB a0d0 online
a0c0t2 33GiB a0d0 online

root@dell:~# megaraid-status
-- Arrays informations --
-- ID | Type | Size | Status
a0d0 | RAID 5 | 67GiB | optimal

-- Disks informations
-- ID | Model | Status | Warnings
a0c0t0 | MAXTOR ATLAS10K4_36SCA 33GiB | online
a0c0t1 | MAXTOR ATLAS10K4_36SCA 33GiB | online
a0c0t2 | MAXTOR ATLAS10K4_36SCA 33GiB | online
root@dell:~#

megacli monitor and configure LSI RAID controller

In this example i am using Debian 7 with raid controller LSI MEGA raid

It is necessary to add repository for the package:

Please add deb http://hwraid.le-vert.net/debian wheezy main to /etc/apt/sources.list

Then apt-get update && apt-get install megacli

megacli is a proprietary tool by LSI which can perform both reporting and management for MegaRAID SAS cards.
However it’s really hard to use because it’s use tones of command line parameters and there’s no documentation.

Gtestet all adapters status and config:
test:~# megacli -AdpAllInfo -aAll
Adapter #0

==============================================================================
Versions
================
Product Name : PERC 5/i Integrated
Serial No : 12345
FW Package Build: 5.2.1-0067

Mfg. Data
================
Mfg. Date : 00/00/00
Rework Date : 00/00/00
Revision No : @A
Battery FRU : N/A

Image Versions In Flash:
================
Boot Block Version : R.2.3.12
BIOS Version : MT28-8
MPT Version : MPTFW-00.10.61.00-IT
FW Version : 1.03.40-0316
WebBIOS Version : 1.03-04
Ctrl-R Version : 1.04-019A
[…]
Logical drive 0 on adapter 0 status and type:
test:~# megacli -LDInfo -L0 -a0
Adapter 0 — Virtual Drive Information:
Virtual Disk: 0 (Target Id: 0)
Name:raid1
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
Size:237824MB
State: Optimal
Stripe Size: 64kB
Number Of Drives:2
Span Depth:1
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy: Read/Write
Disk Cache Policy: Disk’s Default

Exit Code: 0x00

Display, disable or enable automatic rebuild on adapter 0:
test:~# megacli -AdpAutoRbld -Dsply -a0

Adapter 0: AutoRebuild is Enabled.

Exit Code: 0x00
test:~# megacli -AdpAutoRbld -Dsbl -a0

Adapter 0: AutoRebuild is Disabled.

Exit Code: 0x00
test:~# megacli -AdpAutoRbld -Enbl -a0

Adapter 0: AutoRebuild is Enabled.

Exit Code: 0x00

Get and modify rebuild rate:
test:~# megacli -AdpGetProp RebuildRate -a0

Adapter 0: Rebuild Rate = 30%

Exit Code: 0x00
test:~# megacli -AdpSetProp RebuildRate 60 -a0

Adapter 0: Set rebuild rate to 60% success.

Exit Code: 0x00

Show physical disks from first controller:
test:~# megacli -PDList -a0
[…]
Enclosure Device ID: 32
Slot Number: 1
Device Id: 1
Sequence Number: 9
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 140014MB [0x11177328 Sectors]
Non Coerced Size: 139502MB [0x11077328 Sectors]
Coerced Size: 139392MB [0x11040000 Sectors]
Firmware state: Rebuild
SAS Address(0): 0x5000c5000c8579d1
SAS Address(1): 0x0
Connected Port Number: 1(path0)
Inquiry Data: SEAGATE ST3146855SS S5283LN6CNGM
Foreign State: None
We can see that disk 32,1 (enclosure id = 32, slot = 1) is currently rebuilding (firmware state).
Let’s check this operation progress:
test:~# megacli -PDRbld -ShowProg -PhysDrv [32:1] -aALL

Rebuild Progress on Device at Enclosure 32, Slot 1 Completed 51% in 10 Minutes.

Auhtor:viliev