Apache – Redirect Domain
Sometimes we may want to have more than one domain name and all point to the same website. This can be done by setting up a rewrite in the Apache VirtualHost setting. Assume we have setup a website...
View Article.htaccess – Invalid command ‘AuthUserFile’, perhaps misspelled or defined by...
I have a previous post which demonstrates how to add HTTP Authentication by .htaccess. .htaccess – Setting Password For Your Web Folder But if it does not work and shown the following error in the...
View ArticleApache – Redirect non www to www using VirtualHost setting
We can use .htaccess to redirect http://example.com to http://www.example.com by using the rewrite engine. But i find another simple way to implement the redirection just by setting up a VirtualHost....
View ArticleApache – Redirect non-www to www Subdomain
Redirecting non-www to www url can be simply done by adding a virtual host configuration. For example, if i have a domain ykyuen.com and i want to redirect it to http://www.ykyuen.com, just add the...
View Article.htaccess – Redirect non-www to www Subdomain
If you can’t edit the Apache configuration, you can do the redirection by setting up a virtual host as discussed in the post below. Apache – Redirect non-www to www Subdomain Or if you can add the...
View ArticleUbuntu – Limit the RAM consumption by Apache
When i am trying to setup a new server, most of the time i just used the default settings of Apache. But sometimes if the server is not equipped with enough RAM, the Apache service may consume all the...
View Article.htaccess – Deny access for a specific folder under webroot
We can deny the access for a specific folder in webroot. Create the following .htaccess file in that restrictive folder. order deny,allow deny from all allow from 127.0.0.1 All access from other IPs...
View Article.htaccess – Redirect all URLs to a specific sub domain
Sometimes you may have multiple domains which you want to use for your website or web application. Probably you needed to park the domains on your hosting cpanel. In this case, you website or web...
View ArticleApache – Enable Cross-origin resource sharing CORS
Long time ago, we talked about using JSONP to tackle to cross domain ajax issue. jQuery & JSON – Make Cross Domain Request Using jQuery.getJSON() with JSONP But this requires server side coding. If...
View ArticleMake Git work on HTTP protocol
Assume SELinux is disabled on your Git server… The following setup is on CentOS and assume your Git repositories are all located under /data/repos. 1. Install Git and Apache. yum install git httpd 2....
View Article