Archive for the ‘Apache2’ Category.
May 27, 2010, 6:42 pm
To have the server point to the subdomain instead of the domain when the url has “www” prefix then do the following:
Create /srv/www/vhosts/<domain>/subdomains/<subdomain>/conf/vhost.conf
Insert ServerAlias www.<subdomain>
November 6, 2009, 2:49 am
On production environment, you sometimes need to display errors temporarily to see what’s going wrong. Without the need to modify php.ini, you can add this to .htaccess file on the particular web folder you are working on.
php_flag display_errors On
Then you can remove the line afterwards.
September 29, 2009, 8:20 pm
DirectoryIndex alternative-default-home-page.php
January 5, 2009, 5:48 pm
RedirectMatch 301 (.*)$ http://www.newdomainhere.com$1
Save this into .htaccess and upload on the root directory on your old domain.
August 6, 2008, 1:10 am
Follow the links:
Virtual host examples from Apache website.
http://httpd.apache.org/docs/2.0/vhosts/examples.html
Turns out that it is possible to have multiple VirtualHosts on port 80 (Default http), but because of a limitation of SSL, we can’t have multiple VirtualHosts on port 443 (Default https).
I solved the problem as follows. I created the two VirtualHosts on port 80, one on port 443 and one on port 444.
Shared IP, multiple vhosts and multiple SSL certificates on Apache
The process is only 2 steps and involves modifying your Apache configuration.
1. Create virtual hosts “map file”.
2. Modify existing SSL vhost.
Caveat: The SSL certificate used will be common to all SSL vhosts.
Hosting multiple SSL vhosts on a single IP/Port/Certificate with Apache2
The following article discusses the following:
Basics Of Virtual Hosts, Name-Based Virtual Hosts, IP-Based Virtual Hosts, Configuring IP Aliasing, Virtual Hosts with IPs, Multiple Instances of Apache, Example for name based virtual hosts, Example for IP based virtual hosts.
Creating Name Based and IP Based Virtual hosts in Apache