Fine tuning apache and mysql for performance and security

I’ve gone through a process of migration of a server, with help with provided migration scripts, and some hard-coded scripts to help synchronizing latest data, and permission fixing. All done well, and working fine now. However, all installation of services were default, and did not optimized for our needs.

There are few aspect of tuning need to be done, relative to your resource, in terms of available memory, harddisk I/O, and some other considerations. Surely, you want the best performance, with high level of security. At some point, there are some aspect that you should be compromised to get the best in other aspect.

Apache

There a few configuration that would need a change, for example, HostnameLookups. By default it was turned On. While turned on, it will add a latency to the request to resolve the IP before the request were completed. You can disable it by replacing it with

HostnameLookups off

DirectoryIndex negotiation is an option for you to determine what file to be the default file to be loaded in any document root. Avoid using wildcards, and enter the options specifically in httpd.conf file, ordered by the priority
For example:

DirectoryIndex index.php index.htm index.html index.shtml index.phtml Default.htm Default.html

Apache 2.0 equipped with Multi-Processor Module (MPM) which will handle apache connections, handling requests, and forking child process for the requests. There are a few options to chose from, and the most common are worker and prefork. Each of them have their own advantages and disadvantages. Make sure you read through the documentation to understand each options, and how they would help you apache process/request handling.

In my case, I’m using prefork.
StartServers 15
<IfModule prefork.c>
MinSpareServers 10
MaxSpareServers 25
</IfModule>
MaxClients 255
MaxRequestsPerChild 10000

If you are using cPanel, you can edit this in WHM Control Panel -> Service Configuration -> Apache Configuration -> Global Configuration.

Continue reading

Rock climbing in KL, Gua Damai, Batu Caves

I happen to know this place when I first came to Kuala Lumpur, and it have been a common place for weekend activity for quite some time until now. It just lately, I could not spend more time. One of the best thing about the place is the people. Everyone were accommodating, and friendly, not forget to mention about the kids there.

Gua Damai located north side of Batu Caves, near Kampung Melayu Wira Damai. Coordinate: 3.2477904, 101.687463. Last few month, I have the chance to spend some evening there, at the place, and did some bouldering with the kids, and of course, cycling. πŸ™‚ Here are some pictures

Continue reading

Beware of phishing site.

What is phishing anyway?
From Wikipedia, the word phishing means a criminally fraudulent process of attempting to acquire sensitive information from users such as username, password and credit card details by masquerading as a trustworthy entity in electronic communication. Wikipedia:Phishing

Nowadays, you must receive at least one phishing email, containing phishing URL, every time you open your email. Most probably, it will stuck in spam folder. Spam filters nowadays really did what it suppose to do, but not in all cases.

Continue reading

Tioman Island, Pahang.

Last April 2010, I went to Tioman Island with some of my friends from university and office. Its quite a short trip, we spend 1 night on the Island, and 2 night in car while driving. Its was quite a tiring trip, but really great. It cost us around RM 200 (without foods) for each of us.

We depart from Tanjung Gemuk jetty, at about 7am, the earliest ferry to go to the island. On top of the ferry ticket, there was also a marine park permit, that cost us RM7 each. From some articles I’ve read, they said that the ferry should stop at Tekek, then move towards south from it. If you plan to go north, you have to either walk, or rent a boat from Tekek. Our ferry that day start dropping passengers from south to north, starting from Kg Genting. BTW, Tekek is like the main town of Tioman. You will find the only ATM machine (BSN) and airport in Tekek.

desc
Continue reading

Kuala Gandah Elephant Sanctuary, Temerloh.

A friend of mine once mentioned about elephant sanctury in Temerloh, Pahang. Its not too far, and i figured this is the right time to go for it. The right time i mean at that particular time is already 3 month back. Now only I have the time to blog about it.

The place is quite remote, and you have to drive past villages, but its quite easy to find. Just exit at Lanchang, and just drive straight, until you can see signboard to the sanctuary. There are free tickets to be distributed, but they have color scheme for the tickets. The red ticket is for most people, and with this ticket, you can just see and say hi to the elephant. With green ticket, you can have a shower session with the elephant. But, this ticket is limited to 100 tickets issued per day. So, you have to be there as soon as possible before the tickets runs out.


Continue reading

Bukit Tabur and Sungai Pisang day trip

A back while in May 2010, i bring a few of my officemates and friends to Bukit Tabur and Sungai Pisang in Gombak. These place are just my usual place to bring my friends to outdoor activities, with simple hiking, jungle tracking and swimming.

Bukit Tabur is located in Taman Melawati. The place also becomes very popular for hiking activities during weekends, and sightseeing. The sunrise view was magnificent. I have blog about this place once before. There are a few routes, but we choose the place where I’m familiar with, the starting point at the water treatment plant.
Sungai Pisang on the other side is just jungle tracking, just 10 minutes, as we choose to park our cars just by the highway, Karak Highway. Its just about 10 minutes from Gombak toll. I do not want to do 40 minutes tracking anymore, just want to have some picnic, swimming, skip the tracking πŸ™‚

Below are the pictures.

Continue reading

Wall climbing in extreme park, Putrajaya

Its been a long time since my last update on my blog. It have been my log of what I did, something that I want to remember. Well, you can say i forgot things easily.

I’ve been looking for a place to climb. Its been quite some time since I last climb, and I found a place not too far. Its in Putrajaya, Extreme Park. I’ve heard there are off-road bicycle trail near that place, but not really sure where is it. The climbing place is not too far from Putrajaya International Convention Center. The coordinate is N 2 53.318, E 101 40.082” or “2.889, 101.668, you can find it yourself of you have a GPS.


View Larger Map

Belaying Mira

They do provide equipments for rent to all visitors. Its quite a convenient for me to bring my friends who do not have any gears to start climbing, and the rates are quite affordable. Its just that some of them are worn out, and not really convenient to use, like the shoes. The entry fee is RM 6 for adults, and RM 3 for student (provided you have a student card)
Continue reading

Thunderbird in Malaysia, really feel the thunder in my chest!

Credits to Syarafuddin SulaimanCredits to Din

Yesterday I have told you guys I will be going to RMAF Subang Air Base today for Joint RMAF USAF aerobatic performance there today. Well, we made it!
πŸ™‚ Me with Syarafuddin Sulaiman, we were there a a bit late, as it was raining heavily in the
morning in our place. But, we dont want to miss it, and dont want to live in regret and uncertainty, we just went off there in the heavy rain.
Luckily, the air show still being held, but we missed C-17 Globemaster. I dont know whether it in the air or not this morning.

We can see one RMAF Sukhoi jet flying around over in the traffic jam. The traffic jam was horrible. We could not get much good shots for the Sukhoi
jet. We just park the car by the roadside, and walk for a good place to take picturess. We couldn’t get a good shot of the runway, its quite far, and
blocked by a a fence! πŸ™ Din just did what he can. He still can get some good shots.

F-16 Falcon Thunderbird was great. We arrive just in time for the Thunderbirds to come out. The sounds, the vibration over the ground, it was
exciting! We can feel the shaking while one of the jet fly right on top of us. They did a good and interesting formation, one of them was where four
of them fly from different angle towards the runway, and pass by each other in the middle of the runway. That was close!

We didn’t plan the trip very well, we couldn’t get close to the runway, and arrived a bit late. We also missed the C-17 Globemaster session. I also
not sure whether its in the air or not this morning. Hope to get my hands on one of the DSLR myself. Will wait for the next chance πŸ™‚

Thanks Din for the pictures πŸ™‚

Thunderbird in Malaysia, really feel the thunder in my chest!

USAF Thunderbirds - Pics from<br />
Zagispirit-http://www.farhanfaisal.com/wp-conten/uploads/usaf_thunderbirds.jpg
Picture grabbed from Zagispirit, taken at Townsville ADF Airshow
2009

Tomorrow (3rd Oct) there will be an aerobatic demonstration by USAF Thunderbirds and Malaysia Royal Air Force (RMAF) in RMAF Subang Air Base. This
joint event will highlights Thunderbird F-16 and C-17 Globemaster by USAF and also RMAF Sukhoi team.

The event will start at 1030 am, with C-17 demonstration, followed by RMAF Sukhoi airshow. USAF thunderbird airshow will start at 11.30am followed by
autograph signing by Thunderbirds Crew. This event will be open for public for free, and will be expecting huge crowds.

I wish I have my own camera to take the shots. Just enjoying the show la πŸ™‚ You guys dont miss it!

Press release
href=”http://malaysia.usembassy.gov/event_thunderbirds_093009announce.html”>http://malaysia.usembassy.gov/event_thunderbirds_093009announce.html
http://www.bernama.com/bernama/v5/newsgeneral.php?id=441102