Posts Tagged ‘novice’

How to debug mod_rewrite .htaccess problems with RewriteLog / Solve mod_rewrite broken redirects

Friday, September 30th, 2011

Its common thing that CMS systems and many developers custom .htaccess cause issues where websites depending on mod_rewrite fails to work properly. Most common issues are broken redirects or mod_rewrite rules, which behave differently among the different mod_rewrite versions which comes with different versions of Apache.

Everytime there are such problems its necessery that mod_rewrite’s RewriteLog functionality is used.
Even though the RewriteLog mod_rewrite config variable is well described on httpd.apache.org , I decided to drop a little post here as I’m pretty sure many novice admins might not know about RewriteLog config var and might benefit of this small article.
Enabling mod_rewrite requests logging of requests to the webserver and process via mod_rewrite rules is being done either via the specific website .htaccess (located in the site’s root directory) or via httpd.conf, apache2.conf etc. depending on the Linux / BSD linux distribution Apache config file naming is used.

To enable RewriteLog near the end of the Apache configuration file its necessery to place the variables in apache conf:

1. Edit RewriteLog and place following variables:

RewriteLogLevel 9
RewriteLog /var/log/rewrite.log

RewriteLogLevel does define the level of logging that should get logged in /var/log/rewrite.log
The higher the RewriteLogLevel number defined the more debugging related to mod_rewrite requests processing gets logged.
RewriteLogLevel 9 is actually the highest loglevel that can be. Setting the RewriteLogLevel to 0 will instruct mod_rewrite to stop logging. In many cases a RewriteLogLevel of 3 is also enough to debug most of the redirect issues, however I prefer to see more, so almost always I use RewriteLogLevel of 9.

2. Create /var/log/rewrite.log and set writtable permissions

a. Create /var/log/rewrite.log

freebsd# touch /var/log/rewrite.log

b. Set writtable permissons

Either chown the file to the user with which the Apache server is running, or chmod it to permissions of 777.

On FreeBSD, chown permissions to allow webserver to write in file, should be:

freebsd# chown www:www /var/log/rewrite.log

On Debian and alike distros:

debian:~# chown www-data:www-data /var/log/rewrite.log

On CentOS, Fedora etc.:

[root@centos ~]# chown httpd:httpd /var/log/rewrite.log

On any other distribution, you don’t want to bother to check the uid:gid, the permissions can be set with chmod 777, e.g.:

linux# chmod 777 /var/log/rewrite.log

Next after RewriteLog is in conf to make configs active the usual webserver restart is required.

To restart Apache On FreeBSD:

freebsd# /usr/local/etc/rc.d/apache2 restart
...

To restart Apache on Debian and derivatives:

debian:~# /etc/init.d/apache2 restart
...

On Fedora and derivive distros:

[root@fedora ~]# /etc/init.d/httpd restart
...

Its common error to forget to set proper permissions to /var/log/rewrite.log this has puzzled me many times, when enabling RewriteLog’s logging.

Another important note is when debugging for mod_rewrite is enabled, one forgets to disable logging and after a while if the /var/log partition is placed on a small partition or is on an old server with less space often the RewriteLog fills in the disk quickly and might create website downtimes. Hence always make sure RewriteLog is disabled after work rewrite debugging is no longer needed.

The way I use to disable it is by commenting it in conf like so:

#RewriteLogLevel 9
#RewriteLog /var/log/rewrite.log

Finally to check, what the mod_rewrite processor is doing on the fly its handy to use the well known tail -f

linux# tail -f /var/log/rewrite.log

A bunch of time in watching the requests, should be enough to point to the exact problem causing broken redirects or general website malfunction.
Cheers 😉

Palm Sunday day feast in Bulgareevo (Bylgareevo) – A Pilgrimage Journey to venerate a particle of the life giving cross

Sunday, April 17th, 2011

palm sunday cvetnica orthodox icon

I’m just coming back from the Bulgareevo (a small village cituated nearby Kavarna).
Bylgareevo is a middle size bulgarian village situated near the sea and is not famous with anything significant.
The village has two Orthodox Church temples and a serving Priest (an Archimandrite, father Metodii).
Father Metodii is one of this priests that is a person to remember as he is a truly devoted to Christ monk. Since about two years of time he has reconstructed his local village house and the yard nearby the house into something which hopefully in the short future will become a fully monk inhabited spiritual fortress (A Monastery).
Father Metodii lives and believes part of his service to God constitutes in rising this small monastery and gathering together Bulgarian believers in order to further rise up the Bulgarian faith in Christ and to become a center for spiritual pilgrimage.

The monastery already has a monastery bell, a monks cells and the small chapel (parakles/paraklis) prepared to be as a place for monks pilgrimage.

Father Metodii’s efforts to make the monastery an attractive place for future candidate novice Monks and Monks are truly genuine!
All he has done by so far is a good example for all us the Christians to follow. Most of the expenses related to the Monastery building are being paid by the Father himself as he has donated all his possession to the Church.
As part of this efforts to rise up the place as a place for spiritual pilgrimage by God grace Bylgareevo’s monastery has been granted the honour to contain a particle of the Holy Live giving Cross Tree on which our Lord Jesus Christ has been crucified.. By God’s mercy the Patriarch of Jerusalem and the local national museum has donated two particles of the Holy Cross on which our Lord Jesus Christ was Crucified and suffered for our sins.

Now the holy crucifixion cross remains particles are being kept in the Monastery’s small chapel for pilgrimage. Thus the opportunity for a pilgrimage journey to Bylgareevo on this day of great spiritual joy Palm Sunday was a huge blessing for me and the few more brothers and sisters with whom we traveled to Bulgareevo
Below I present you with a picture on which you can see Father Metodii (Methodius) holding in hands the small particle of the Crist’s Crucifixion cross tree (embedded in the center of the wood cross on the picture).Father Methodius holding a cross containing a particle of the cross on which the Lord Jesus's Christ was crucified

The name of the village Bulgareevo is also really interesting as it’s a direct direvative from the word Bylgariq (which translates as Bulgaria).
Along with the two particles of the Holy life giving Cross where the saviour Jesus Christ was crucified, father Metodii has collected some great saint relics, just to name a few of the relics which are in the newly built monastery in Bulgareevo; holy relics of saint Panteleimon, holy Relics of Saint John of Rila etc.

Now going back to Palm Sunday‘s feast essense, Palm Sunday is among the 12 Church feasts in the Orthodox Churches, we use to call (The Lord’s feasts [Gospodski Praznici]), and thus is one of the 12 feasts which are most spiritually richful for Bulgaria as an Orthodox Nation and for all other national Orthodox Churches around the world.

Palm Sunday is always celebrated on the Last Sunday before the beginning of “the passionate week”, the week in which we who believe in Christ’s name remember the great trials and suffering our Lord and Saviour Jesus Christ has carried for the salvation of all Christians.

Palm Sunday is the feast in which we as we read in the Gospel readings in the Church, commemorate Christ’s entrance in Jerusalem on a small donkey.
Here is a small chunk of the Gospel reading for the day:

They took palm branches and went out to meet him, shouting, "Hosanna!" "Blessed is he who comes in the name of the Lord!" "Blessed is the King of Israel!"

In this scripture text as we read above the people were glorifying God and Christ as the son of the God in accordance to the Old testament scriptures in which it was prophecised that the Saviour of Mankind (The Messiah) would walk in through the entrance doors of Jerusalem riding a donkey.
People who were present observing the Lord’s entrance were witnessing the fulfilment of the old testament psalms prophecies by glorifying the Lord.

This were the same people which just a week later were screaming “crucify” him …

On Palm Sunday it is a Church tradition in the Bulgarian Orthodox Church that willow branches are being blessed by the priest and then distributed among layman as a blessing and a remembrance of the Palms which were layed upon the Lord’s entrance in Jerusalem.

Later on we took the willow branches in our homes and place it in our home icon-stands (the place with the icons we use for a prayer to God).

The use of willow branches in our Church has been established through the years as a Palm Trees substitute as the Palm tree does not grow in the Bulgarian lands

In Bulgaria Palm Sunday is known as Tsvetnitsa. People with flower-related names, (for example Tzviatko, Margarita, Lilia, Violeta, Yavor, Zdravko, Zjumbjul, Nevena, Temenuzhka, etc.) has a name day on that date.
It’s a pity that many bulgarian people who are baptized in our Bulgarian Orthodox Church, fails to understand the symbolic meaning of the willow branches and doesn’t really understand the essence of the Church feast but just go to Church to light up a candle “to have a good fortune and health”., usually mostly missing the spiritual importance for us the Christians of this feast.. but I hope things would get better with time and more Bulgarians who lost their roots during communism will come back to their ancient faith the Orthodoxy.

I recommend to all Orthodox Christian believers from Bulgaria, Romania and Russia who has the oportunity to visit Bulgaria as a tourist destination or on any other occasion to visit Bylgareevo and do a pilgrimage journey to Bylgareevo newly constructed monastery containing the holy relicts.

You will receive the great spiritual blessing of venerating the particle of the cross on which our Lord Jesus Christ’s most holy body was hanging on!
The cross on which the redemption of mankind was achieved by God’s son 2010 years ago!
The cross on which we have received a forgiveness of our sins!
I thank the Lord for having this good blessed day and I pray that we all who believe in his name come to the understanding to know his as he knows us!

Few nginx.conf configuration options for Nginx to improve webserver performance

Tuesday, April 12th, 2011

Nginx server main logo with russian star
From my previous two articles How to install nginx webserver from source on Debian Linux / Install Latest Nginx on Debian and How to enable output compression (gzipfile content compression) in nginx webserver , I have explained how the Nginx server can be installed and configured easily.

As I’m continuing my nginx adventures this days, by trying to take the best out of the installed nginx server, I’ve found few configuration options, which does improve nginx’s server performance and thought it might be nice to share it here in hope that some other nginx novice might benefit out if them.
To setup and start using the options you will have of course to place the conf directives in /usr/local/nginx/conf/nginx.conf or wherever your nginx.conf is located.

The configuration options should be placed in nginx’s conf section which starts up with:

http {

Here are the configuration options useful in hastening my nginx’s performance:

1. General options nginx settings

## General Options
ignore_invalid_headers on;
keepalive_requests 2000;
recursive_error_pages on;
server_name_in_redirect off;
server_tokens off;

2. Connection timeout nginx settings

## Timeouts
client_body_timeout 60;
client_header_timeout 60;
keepalive_timeout 60 60;
send_timeout 60;
expires 24h;

3. server options for better nginx tcp/ip performance

## TCP options
tcp_nodelay on;
tcp_nopush on;

4. Increase the number of nginx worker processes

Somewhere near the beginning of nginx.conf file you should have the directive option:

worker_processes 1;

Make sure you change this option to:

worker_processes 4;

This will increase the number of spawned nginx worker processes in a way that more spawned threaded servers will await for client connections:

Being done with all the above settings, as a next step you have to restart the nginx server, in my case via the init script:

debian:~# /etc/init.d/nginx restart
Restarting nginx: nginx.

Now to check everything is fine with nginx and more specific that the worker_processes 4 options has taken place issue the command:

debian:~# ps axu |grep -i nginx|grep -v grep
root 20456 0.0 0.0 25280 816 ? Ss 10:35 0:00 nginx: master process /usr/local/nginx/sbin/nginx
nobody 20457 0.0 0.0 25844 1820 ? S 10:35 0:00 nginx: worker process
nobody 20458 0.0 0.0 25624 1376 ? S 10:35 0:00 nginx: worker process
nobody 20459 0.0 0.0 25624 1376 ? S 10:35 0:00 nginx: worker process
nobody 20460 0.0 0.0 25624 1368 ? S 10:35 0:00 nginx: worker process

Above you notice the 4 nginx processes running with user nobody, they’re the same configured worker_processes I just pointed out above.

Will the End of the World come in 2012? The Orthodox Christian perspective

Friday, April 1st, 2011

Nowdays, there is a lot of talk and discussions about the end of the world.
The fear of the End of the World in year 2012 is highly proclaimed, ancient mayan false “prophecies” are highly buzzed about.

Many people are more interested into the of the world, as many of the signs of the end times has been fulfilled.
Many people are turning back into occult and pagan beliefs to look up for prophecies to backup their thesis of the mayan prophecies.

A mess of false prophecies from different religions are usually mixed in order to proof to ourselves that the end of the world is at hand.
A number of apocalyptic movies has been produced until in the making industries as the more the time is close to year to 2012 the more sci-fi and all kind of movies on the apocalyptic theme are being produced.

Many people live in a constant fear that they’re gonna die in 2012 and start living even more irresponsible than before, asserting that there is no reason to do anything valuable now as the world’s end is near.
I myself some few years ago have been among this blind “false prophets” and has confessed the same destructive philosophy.
Yes it’s true that the Apocalypsis is approaching and has been approaching since the last 2011 years that passed since our Lord Jesus Christ’s birth on earth.
What is erronemous is the mistake that, we should live in fear about the end and we should do belief like the pagans in their shaky wrong beliefs based more on superstitiousness than on prophetic facts or signs of the time.

Even a plenty of music bands Protestant Christian bands like Saviour Machine are writting lyrics on the topic of the End Times, spreading fear unto some degree even among Christian Metal heads.

The situation outside the realm of the Christian secularity is even worser, I’ve heard a whole bunch of people especially in (USA) are preparing food and provisions to survive great cataclysm that they say is expected to come over the earth.
You can judge how insane is that! The end of the world as my spiritual father has told me some long time ago could be individually for us in every further minute.
If I as an individual die then I will experience the end of the world and when I will die is in God’s hands, so there is no point to worry about where the all world will end, if there is a high probability that my personal end could occur every single minute.
It’s sad that the consequences of such an panical beliefs about “the evils that are about to come on the world” are being falsely interpreted among Christians, this kind of tendency is also spread this days even among some practicing Orthodox Christians.

At many times studying of the Holy Bible “Book of the Apolapysis” are soul and mind destructive.
It’s a well known fact that in the past the book of Apocalypsis has been officially included in the Holy Bible, somewhere nearby the 5th century.

The reasons the holy church fathers decided to place the book of revelation in the bible so late is that, many of the things written are hard to understand and can lead novice Christian astray from the true essence of our faith which is love for God and love for the neighbor
Very pitily even I as an Orthodox Christians have suffered the great consequences of attempting to interpret the prophecies among the end of the world.

Therefore I found interesting that I share in this article what is the position of the Orthodox Church on the Apocalypsis or the so called End Times

First it should be said that Orthodox Christians positions is mostly based on factological information and prophetic saying by the Holy Fatherswhich by itself require a spiritual father to interpret them properly.

In the Orthodox Church we’re expecting the End Times, since the beginning of the one Holy and Apostolic Church. However the Apocalypsis is never being perceived as something that we should concentrate about but as an information that it’s good to have a general awareness of in order to have understanding in the spiritual times we’re living and how close we’re to the Second coming of our Lord and Saviour Jesus Christ.

The Orthodox Christian belief on Apocalypsis is completely opposite to the worldly belief which plants panic and fear in people’s mind and souls.
We belief that drawing near to the End Times, we’re drawing near to our second coming of our Lord and hence near to our eternal Salvation therefore the end days to come are not to be a concern of fear but on a contrary, they should accepted with humility and joy that we’re drawing near to our eternal salvation.

As a part of the topic of the End of the World, it’s very common nowdays in Christian and Non-Christian (heretical) groups (Mormons, Jehova’s Witnesses) to talk about the expected AntiChrist and to propagate fear in their deceived deciples.

These heretical groups has the wrong idea that starts with the definition of AntiChrist in that groups they belief AntiChrist means Against Christ, which is not very proper definition of the word.
The Orthodox Christian understanding about the AntiChrist word is Instead of Christ
Therefore the true meaning of AntiChrist in the original church was always perceived as Instead of Christ and not literally Against Christ.

Instead of Christ means, a substitute for Christ. Now if we think deeply in the modern world we have a bunch of substitute of Christ in the form of passions we have, disbelief inattendance of the Holy Liturgy – the Ancient Church service in our Orthodox Church.
In the number of Instead of Christ are a false belief to all kind of transcendental philosophies buddhism, reincarnation, hinduism, muslim beliefs, cult to public perons like let’s say Madonna or Marilyn Manson etc. etc.

If we as Christians have an example person for our life instead of having our saviour Jesus Christ for an example to follow, then we are definitely following an AntiChrist.
Don’t get me wrong I don’t say that Madonna or Michael Jackson or whoever is an AntiChrist. They’re definitely not, even though very often their behaviour and public performance becomes the reason for many people to be falsely leaded to false beliefs and false teachings different from the teachings of Our Holy Orthodox Church.

In that sense the danger of the mani AntiChrists is rooted in following anything different from the real Lord Jesus Christ who leads our Orthodox Church and who gives us grace by the 7 Church established mysteries.

Now as I said a few words about the general perception of Apocalypsis, the End of the World and the AntiChrist. Let me answer the question is there a date when the world will end up?

The Church is definitive about that and the answer is NO! NO! and NO!

It’s even written in the Holy Bible, here is the exact quote that clearly states, that we’re not given to know the exact time and date but only some general signs:

Mark 13:32:
"No one knows about that day or hour, not even the angels in heaven, nor the Son, but only the Father."

Having said that for us Christians it’s more than clear that it’s almost impossible that the end of the world is in 2012, especially if that kind of false belief is taken from a pagan religion like the mayans.

Throughout the years before this year 2011, there were plenty of so called “prophecies”, each of which has claimed the end of the world will be soon, some of the “new days end time prophets” even has gave a specific date and time for the global cataclism expected to occur..
For instance followers of William Miller (the founder of the deadly end-times movement) has predicted the exact day on which the world will end according to their calculations this was Oct 22, 1844.

You can see by your own that this kind of deliberate fear creation and massive panic is not something new and has been known to exist for several decades.

Concerning the fear of the end of the world, I remember that one of our Holy Fathers said I quote by memory: “Even if the World falls apart and the sky falls over, I would not be afraid for I believe in God”.

Our Orthodox Christian perspective is not to focus on external cataclysms and calamities but to focus on our internal spiritual life.

Knowing when the world will come doesnt’ worth a cent for us the Christians, as it is not a goal of our living. Our Goal is to gain an eternal salvation by faith in Christ and repentance for our bad sinful lives.

Today many of the panical false beliefs and “warnings” from Jehovah’s witnesses and other sects a like are absolutely deliberate, they use this as a tool to set fear and then gain followers of their soul destructive satanic teachings.
We the Orthodox Christians, should not be afraid of the end but be joyful as it’s said in Thessalonians: “..Always be joyful..”

I personally belief that the end times fear that is being planted nowdays from all medias and the internet is at many times done on purpose, to even try to deceive us the Orthdox Christians.

This kind of end times and mystical interest into prophecies and future things to come very often could mislead us and make us belief many of the false beliefs the fortune-tellers has and preach.

Unlimited interest into spirituality, definitely ends up in spiritual blindness and spiritual disored, even often to a mind inconsistencies.
The recent raise of Neuro Lenguistic Programming is nothing different, it’s just another way to blind up and deceive people and mislead them from the way of thuth that our Saviour Jesus Christ has shown us..

Interest into broken-mysticism is very natural for our fallen sinful state, but we should not let this to lead our lives, we should not live in fear Christ has never given us a spirit of fear right on the contrary.

Note that the above reasonings include a lot of my personal reasonings and it might be that I’m wrong somewhere as I’m not a father and I’m not 100% aware of all Church beliefs.
However I’m pretty sure that most that I said so far is truthful and does correspondent to our Orthodox Church understanding about Apocalypsis and End times.
There is much to be said on the topic of End of the World and our Orthodox position about it, but as my goal was simply to answer the Will the world over in 2012 and I believe I answered thoroughfully enough it will most probably not!Now to close up this article, I do pray that God (The Holy Trinity) save us and protect us from all evil and show us the true way in the Orthodox Church and deliver us from false doctrines, false beliefs and end times paranoias.