Apache Configuration
Follow the steps after these file attachments first, then copy these four files onto the new machine.
Might want to read through the whole thing, because the notes below assume you are setting up Apache from a fresh install, so some of it is redundant if you are copying the four files below over the ones you would have created following the steps below.
Check this link for Optimizing Apache
httpd.conf.txtports.conf.txt000-defaultsslmkvhost(This script will create virtual hosts for you.)mkvhost2(The new version of mkvhost.)mkvhost-zend(The zend server version of mkvhost2.)make_page(needed for mkvhost-zend to work.)
SSL Info
More info found here - http://superuser.com/questions/73979/how-to-easily-create-a-ssl-certificate-and-configure-it-in-apache2-in-mac-os-x
Create a Certificate
$ sudo apt-get install ssl-cert $ sudo mkdir /etc/apache2/ssl $ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
Or use this method to create the ssl selfsigned certs and key:
$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
Install Module
$ sudo a2enmod ssl $ sudo /etc/init.d/apache2 force-reload
Create virtualhost
Make a copy of the default Wiki/VirtualHost
$ # or you can symbolically link these $ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
Modify /etc/apache2/sites-available/ssl so that you have,
Wiki/NameVirtualHost *:443
and
<Wiki/VirtualHost *:443> Wiki/SSLEngine On Wiki/SSLCertificateFile /etc/apache2/ssl/apache.pem . . . </VirtualHost>
Enable SSL virtualhost
$ sudo a2ensite ssl $ sudo /etc/init.d/apache2 reload
If you want to force SSL - http://www.cyberciti.biz/tips/howto-apache-force-https-secure-connections.html
Modify /etc/apache2/sites-available/default so that you change your Wiki/NameVirtualHost and any other virtual hosts to *:80 as in the next two lines.
Wiki/NameVirtualHost *:80 <Wiki/VirtualHost *:80>
Restart Apache server
$ sudo /etc/init.d/apache2 restart
Enable the following modules
$ a2enmod rewrite
# ls mods-enabled/ alias.conf@ authz_default.load@ autoindex.conf@ dir.load@ negotiation.conf@ php5.load@ rewrite.load@ ssl.load@ alias.load@ authz_groupfile.load@ autoindex.load@ env.load@ negotiation.load@ proxy.conf@ setenvif.conf@ status.conf@ auth_basic.load@ authz_host.load@ cgi.load@ mime.conf@ perl.load@ proxy_http.load@ setenvif.load@ status.load@ authn_file.load@ authz_user.load@ dir.conf@ mime.load@ php5.conf@ proxy.load@ ssl.conf@