How to make a folder password protected

This is a very simple task to do but still sometimes you need a guide for smooth sailing. Instead of mailing the same content again and again I decided to delegate the work to blog. I am covering the htaccess method for password protection.

Make sure you have access to use htaccess (Check your apache config or ask your hosting company). In order to protect a folder, you need to have two files inside the folder,

  • .htaccess:
    AuthType Basic
    AuthName "By Invitation Only"
    AuthUserFile (Path to the passwd file)
    Require user (username)

    Example
    AuthType Basic
    AuthName "By Invitation Only"
    AuthUserFile /home/www/secret/passwd
    Require user ajinimc

  • passwd: Go to http://spectrum.troy.edu/password/ and type the username and choose a password, lets take an example (username: ajinimc, password: 1234). The website created the encrypted password ajinimc:C6DneUKC5gSG2. Now add this to passwd file.

Now the folder is password protected. Try http://www.idealwebtools.com/secret/ . Hope it helps.

Google helps in Simple Hack to other’s server – Munin

Wanted to learn how much CPU or memory other servers utilize? For your own server you can always do some linux command to get it.

Use Top, uptime, free -m. But how to see other server details, use one command Google (this query will show you different people using munins for server monitoring).

Some of the examples :-

  1. http://munin.linefeed.org/
  2. http://monitoring.medias-cite.org/munin/index.html
  3. https://munin.sioban.net/

It is advisable to make munin directory password protected (as you do not want to shell out any information about your server).

SVN error due to htaccess

The interview spree continues but hoping to finalize one tech analyst today. He is able to solve all fizzbizz problems atleast. For last 2 days we were facing some problems with SVN. There is no problem with SVN update or SVN checkout but while committing files it shows an error.

sh-3.00$ svn commit test.php -m "Aji: adding a test file to check svn problem"
Adding test.php
svn: Commit failed (details follow):
svn: PROPFIND request failed on '/svn/blahblah/trunk/test.php'
svn: PROPFIND of '/svn/blahblah/trunk/test.php': 200 OK (http://www.blahblah.com)

We earlier presumed it to be a typical SVN permission problem but everything was ok. Also none of the SVN folders were corrupted. We checked the apache configuration which had

<location /blah-blah/svn>
DAV svn
SVNParentPath /blahblah/svn
AuthType Basic
AuthName grmtech.com
AuthUserFile /blahblah/etc/svn.basic.passwd
Require valid-user
AuthzSVNAccessFile /blahblah/etc/svn-access.conf
</location>

Also we realized that the problem started occurring after adding the htaccess to http://www.blahblah.com. Now as anyone will do we have kept the SVN repos in a different folder than the public_html (Document root of the website used for SVN).

After testing few things we came to a conclusion that it is happening because of the customized 404 catcher
ErrorDocument 404 /sys/common/tools/404handler.php
We were much worried as the document root was not supposed to be accessed during these calls, it should be taking it from the SVN folder. After reading some apache docs I understand the order of its processing:-

The <location> directive provides for access control by URL. It is similar to the <directory> directive, and starts a subsection which is terminated with a </directory></location> directive. <location> sections are processed in the order they appear in the configuration file, after the <directory> sections and .htaccess files are read, and after the <files> sections.</files></directory></location>

.htaccess is getting processed before the <location> directive. Now the issue was how to make the </location><location> directive work before htaccess. After some tryouts we were not able to do it. Then we took the help of Alias. We added

<virtualhost 1.1.1.1:80>
--
--
Alias /blahalah/svn "/complete-path/svn"
<directory "/full document root path for the website/">
--
--
</directory></virtualhost>

It is working fine. Hope it helps someone in similar situation. Joing back to work, planning to stay back at company guest house for server auditing.

Interview spree – Going OO with Qs

I have some 5 post in drafts as they are connected and should be released with details. Just got back after a long 12 hrs work (interviews and CV short-listings). Preparing technical papers (we call it Tech Tryouts) is a big ask esp when people pass on the papers.

This time I decided not to waste a complete paper unless the person is suited for the post. I have divided the question sets into 3 parts – 3 marks, 5 marks and 10 marks sections. Obviously, level of difficulty is proportional to its weight. Then I made 3 paper bags for each section and put the resp questions (each question on a piece of paper) in it. Now people can take it one by one, some who starts with 10, generally ends up exchanging it with a 3 marker. One who is not able to solve 2 consecutive problems is not selected. I generally have a lot of fun during this phase making few friends as well. One of the candidate (who was not selected) asked me few questions related to web architecture (may be to test me :)), we ended up with another typical AjiNIMC short lecture (but it was fun, hope he was helped).

Some (not all, may be 30%) interviews remind me of the post entitled “199 out of 200 programmers can’t program“. Generally the first bag (3 marker) contains very basic questions with switches, recursions and basic logical problems. Sometimes it surprises me when experienced people are not able to solve FizzBizz problems. With experienced lot I generally ask about basic web architecture, DNS systems etc.

I will be having few more interviews tomorrow and then I will get back to server auditing and ofcourse blogging, till then you can visit my daily recommended posts.

Why not to count the web-industry awareness lead

As I mentioned in my previous post that industrial awareness can give you the lead (at a certain additional cost). For every industry the lead helps but for web (tech) industry to a lesser extent. Here is my view point on “Why not to count the web-industry awareness lead”.

Who all can gain from Industrial awareness?
The early leaders doing the industrial awareness can become the market leaders with proper branding but it does not guarantee a top position in market for long. Esp for web industry (in general tech industry) it guarantees nothing. Sometimes the biggest gainers can be the low profile later entrants, let me take an example. When the bigger sportswear brands, like Nike, Reebook and Adidas, advertised for sportswear then the batas and other local competitors juiced the industrial awareness with a more affordable range and multi-purpose sports shoe. History will be repeated with Indian web and it will happen more often that other sectors. We will see a local group of brainy kids challenging naukri.com, shaadi.com and all other major early leaders. This will happen due to following factors:-

  1. Low resource cost for web startups. Low innovation costs (even one person can run it for free). Web is basically a pure brain business.
  2. Less popular sites/business can take bigger risks and try bigger innovations. Since I am using naukri.com more often for recruitment purpose so here is another example from naukri.com. Naukri.com will have to think many times before simplifying its interface (which really is very complex and messy, reminds Jeff Bezos of Amazon of 1908 Hurley washing machine) but you will sites like simpyhired.com trying it without any fear.
    naukri.com interface
    (Complex interface of naukri.com with popups)

    Simplyhired.com simpler interface
    (click to enlarge. May be, a simpler interface of simplyhired.com, I have not reviewed it yet)

    Job portal analysis for Indian market
    Now the current stats is in favor of naukri.com (due to the web-industry awareness lead in India with a bigger job market) but will it stay for long (no guarantees, Google In Talks To Acquire SimplyHired).

  3. There is an existing industrial awareness which can be cashed.
  4. Web is low cost (almost INR 0), a person getting registered to naukri.com and jobsahead.com gains more than one who registers only with 0 when the cost for one and two are same. Users will like to allow more than one job portal at a time, so no need to motivate for the most costly customer introduction phase. In web business esp networking sites, flies attract flies not honey alone, so a better user base will attract more employers and more employers/jobs (due to free lunch) will attract more job-seekers.

A little deeper analysis can reveal more reasons on why not to count the web-industry awareness lead.

Does Alexa hate firefox?

I am not sure what I am doing wrong but as a user I am getting an error with Alexa when running on FF but not while running it using IE. I am not able to compare two sites using FF but with IE I face no problem. Here is a snapshot for alexa homepage which offers a default comparison.

Alexa firefox
(Click on the image to enlarge it)

Is this happening because of some FF extension or settings, I need to debug it further.

Update
I was not aware of following issues (I discovered it while searching google news)

After reading this what I can understand there stand on third party websites using alexa comparison data. Looks like they have introduced a bug on their own system. I have enabled the referral tracking on FF but still it doesn’t work.

Further update
See the site carefully, FF and IE has two different versions (may be IE the latest). IE doesn’t allow the sharing of graphs. “Put this graph on your site!” and “Permalink” links are missing.

Update 9th June 2007
Finally I got an email from Alexa team after almost 20 days. It says

Thank you for contacting Alexa Internet.

We thank you for bringing the matter to our attention. We made a number
of changes to the design of our website recently, and had some bugs. WE
believe these issues have been resolved.

Thank you for your interest in Alexa.

Best Regards,
Alexa Internet Customer Service

Sad that it is not fixed yet, I wonder whether they have checked it. I replied them too

I am afraid it is not fixed yet, look at the http://www.alexa.com/ using firefox and Internet Explorer (IE), see the comparison chart. IE shows all 3 graphs but FF shows only one line graph.

Industry awareness campagins costs but helps

Indian Web companies are growing or may be Indian companies have started respecting web for its reach and power. Not only Indian companies but all Indian organizations. I just wrote a letter to one of the Christian organization head quarters on web reach. In my previous post I had mention about the alpha phase of Indian web, everyone wants to experience the true web power. It looks easy, attractive and powerful but not till you experience it that way. I knew this phase was to come (in India) and thanks to all who spent plenty on industrial awareness.

What is industrial awareness?
We Indians never thought that we could get a life partner through web (thanks to shaadi.com for the industrial awareness). We never thought of getting a job though web till naukri.com made it a visible reality. It took some time and thanks to naukri.com for having the patience and the will to spend extra on industrial awareness. Hey, orkut knows more about my batchmates than I do, I never thought of such an option. Selling, buying, communicating and everything is now possible through web. Thanks to all the advertisements and extra pain taken by the companies in doing industrial awareness. (Also you can thank me for industrial awareness. I talk about web industry before every pre-placement talks) It costs a lot but it certainly helps in getting the early lead and to become the synonym for the industry (like Google is for search or xerox is for photocopy). Branding for web-industry is not an asset but THE asset and early birds can go all the way to the top as THE BRAND.

Offline example of Industrial awareness
One of the best example I can remember is from the Sportswear industry. During 1995-96 when the global sports majors entered the Indian market, they spent a lot of money on advertisement. Most of the money was spent on industrial awareness, a shoe for jogging, a shoe for basketball and so on (Though many global winners became local losers in India). There was no visible sports wear market but with industrial awareness campaigns it became a need. Everyone then started to desire and own a paid of sports shoe. Recent introduction of after-bath products are other examples (Livon, Marino, after-bath lotion ..).

Does Industrial awareness helps?
In my opinion half of the money spent by naukri.com was utilized for industrial awareness. Web being in alpha phase in India might have cost leaders even more than half of their marketing budget. I have heard people unsuccessfully explaining web illiterate about getting a job through web. Without an industrial awareness companies in the industry will have no relevance either. Now there are plenty of job portals targeting Indian market but I am sure people consider naukri.com as the best and only brand (yet, Also job portals are a different market where a customer, the job seeker, never gains anything in being loyal, surfers uses more than one portal to get a better reach). Becoming the only brand is the only advantage of Industrial awareness.

More work for SEO – Even unborn babies need SEO

You’re a Nobody Unless Your Name Googles Well” say wsj.com. Is it talking about businesses? No, this time it is about individuals, the unborn babies.

Number #1 in Google SERP
I stumbled upon http://online.wsj.com/article/SB117856222924394753.html, which says,

So when Ms. Wilson, now 32, was pregnant with her first child, she ran every baby name she and her husband, Justin, considered through Google to make sure her baby wouldn’t be born unsearchable.

Great. Will future babies have md5 encrypted names too :)? I forwarded this article to SEO groups to motivate them (who are somewhat depressed with recent Utah episode).

A scene from 2009, Aaron Hall’s office.

Client: I want to name my baby?
Aaron Hall: Thats great, everyone needs to name their baby, how can I help you?
Client: All the names have high competition in Google, I want a name which is SEO friendly, easy to remember (should pass phone test), easy to search and should be able to rank #1 in Google in next 8 month 12 days.
Aaron Hall: Do you have a paypal account (owned by Google by 2009)?
Client: Yes, I do have.
Aaron Hall: Do not worry Maa`m, you deliver baby I will deliver the ranking.

If this craze picks up then no one will ever name their baby’s Matt. Guess the future names then?

Google toolbar/Algo Vs ICANN definition

Recently while discussing about canonicalization at WMW a member (bcrbcr) pointed out an issue with Google Toolbar conflicting with ICANN definition for domain names.

ICANN says,

EXAMpLE.com
EXAMPlE.com
EXAMPLe.com
etc.

In the languages that utilize Latin characters (e.g., English, Finnish, German, Italian, etc.), each letter has two variants: upper case and lower case. The Internet’s basic DNS and hostname specifications provide that the upper-case and lower-case variants of each letter are considered to be equivalent. Thus, all the variant domain names in the above list are treated as the same domain name.

Now does it apply for example.COM (COM is in upper case) too?
In my opinion yes, “as example is to .com, com is to dot (the fully qualified domain name is example.com. not example.com, the silent dot says a lot about Web architecture“. So the case of the TLD (Top Level Domain) should not matter.

Issue with Google toolbar
Google Page rank error
Google Page Rank for google.com

  • google.com – PR 10 (all lower case)
  • GOOGLE.com – PR 10 (The TLD is lower case, rest part is upper case. Even a mix of upper and lower case gives the same PR)
  • google.COM – No PR (When the TLD is in uppercase it doesn’t work)

Can this be a problem?
Yes, only from Google’s ranking. Google gives a lot of value to links and PR is just a small indication of its link juice. If Google is considering both these Domains different at PR level then there is a chance that it happens while counting the Link value as well. If some links are coming to example.COM then may be those links won’t be counted under lower case TLD domain (which is technically the same domain). I will need to some experiments to confirm it.

Other observations
This problem is not there for .co.uk or .co.in. This problem exists for .org. Other TLDs I will have to check.

As I mentioned earlier, we are not able to solve it using any canonicalization. Are we missing anything? Btw the WMW discussion is now labeled as Featured Home Page Discussion.

Linking to http://www.mattcutts.COM as a test case.

Canonicalization Series 2: Domain name to lower case

I will continue the series on canonicalization (I have a big post under draft, still adding points to it). I had started a thread at WMW about canonicalization where I saw a very interesting query today. It was about converting upper case domain name to lower case.

The query says,

The following is my current (simple) Mod rewrite, and I am still confused as to why the capitalisation in the domain doesn’t get forced to lower case.

I assumed that www.EXAMPLE.COM would be forced to www.example.com – doesn’t seem to work that way.

Is making upper case domain name to lower case part of canonicalization?
Certainly not. Let me allow the authority docs do the explanation,

example.com
Example.com
eXample.com
exaMple.com
examPle.com
exampLe.com
examplE.com
EXAMPLE.com
ExAMPLE.com
EXaMPLE.com
EXAmPLE.com
EXAMpLE.com
EXAMPlE.com
EXAMPLe.com
etc.

In the languages that utilize Latin characters (e.g., English, Finnish, German, Italian, etc.), each letter has two variants: upper case and lower case. The Internet’s basic DNS and hostname specifications provide that the upper-case and lower-case variants of each letter are considered to be equivalent. Thus, all the variant domain names in the above list are treated as the same domain name.

Since the lower case and upper case domain names are technically same we do not need to do canonicalization (also we are helpless, we are not able to do anything as the server variable is in lower case always). Canonicalization is needed for the URLs which can be technically different but are same for your domain. Example www.idealwebtools.com can be technically different from idealwebtools.com (without www) but currently represent the same document.