apache

FCKEditor in HTTP Secured Websites

Usually, you do not want websites that are still under development to be visible to the Web at large. Even if you do not care about that, at the least - you do not want such websites to be indexed by search engine bots. Bottomline - you want the "dev" websites behind a lock. One way to secure, is to restrict IP addresses, but then - that is so '90s! In the modern world we are way too mobile, for such approaches. They will just add annoyance and stand in the way of productivity. If you are using Drupal, one solution is to use the Securesite module. Or maybe not. In a busy development shop you usually deal with a dozen of under-the-development projects and triple that amount of projects that you maintain, hence still have dev environments for. Maintaining Securesite for each one of them is a maintenance nightmare. Please note, we are not even mentioning how buggy Securesite is and how it conflicts every time you try to do something advanced. Where I work, we chose a parsimonious approach.

Advanced Apache Security

Task: allow unrestricted access to a virtual host from a range of IPs, require MySQL-based authentication from any other IP.

Solution:

Drupal: Who Is Subscribed to My RSS Feed?

The RSS feed subscribers are the most valuable users of your website. Those are the loyal customers, the true audience of your website. You do want to know how many of those you have and who they are.

Unfortunately, to my knowledge, Drupal does not currently have a good module to track RSS Feed subscriptions. It is not an easy module to write, either because identifying unique subscriptions is non-trivial problem.

In any case, there is http://www.feedburner.com and we could use its kind services. Linking directly to FeedBurner is not such a great idea. though. First, you may already have subscribers and you want them to be tracked, as well. Secondly, if FeedBurner suddenly goes south you do not want to lose all your subscriptions and - you may not want to change http://www.example.com/rss.xml in three places in a Drupal template.

So, what to do? If you have access to .htaccess and mod_rewrite - you have a perfect solution. What you will do is - you will create an account with FeedBurner and temp-redirect (HTTP Status 302) your original feed URL to the FeedBurner one. Sounds easy, eh?

Multidomain The Right Way in Drupal

Many websites purchase variations of a domain name to protect digital brand identity. At the minimum, companies want to own .com, .net, .org and ccTLD versions of their brand name. Logical step is to attach all these domains to the same website. But, wait - then the same pages will be accessible from different URLs - not good. It's bad for your search (e.g. Google) rank, traffic analysis and for many other reasons, I am lazy to list here.

If you are using Drupal, the main .htaccess file has a commented-out line that fixes this problem. In the demo version, it allows you to redirect all www.example.com traffic to example.com or vice versa. But following the example, you can easily figure-out how to do it for other cases, as well.

However, there is a problem with the default version. It chops-off the URI part of the URL. Meaning, it will send your request to http://example.com/news/1234 to just http://www.example.com. Not too good.

So, here is the code you need instead:

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule (.*) http://www.example.com/$1 [L,R=301]

Disabling MySQL and FTP in XAMPP on Linux

XAMPP is one of the greatest (i.e most useful) bundled open-source packages that gives an easy, rich LAMP installation in seconds.

If you have tried it, you know that installing many different PHP extensions is neither easy nor fun on Linux. Well, except, maybe on Debian/Ubuntu where you can easily add components with apt-get. Alas, a lot of corporate production systems run RedHat and there XAMPP comes as real life-saver.

One thing about XAMPP though - it installs a whole bunch of stuff like Apache, PHP, MySQL, Proftpd, Webmin etc. I never use or enable FTP because I think it is insecure, legacy protocol that should never be used. Use SSH instead. As for MySQL, I like to install it myself from official MySQL binary distribution. It\'s a database server, hence - tricky and needs more attention than a vanilla installation. At least - that is my taste.

So, how do we disable FTP, MySQL and WebMin in XAMPP installation and use it only for Apache/PHP/Perl (we could install Python add-on, too) ?

Syndicate content