Pages

Apache2 Config for SSL

I used this tool to escape the script for html rendering.

<virtualhost *:443>
        ## Mostly default values -- see below for EDITS
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    ## EDITS   
    ## Proxy server for Rstudio server -- see http://rstudio.org/docs/server/running_with_proxy for details
   <proxy *>
     Allow from localhost
   </Proxy>
   ProxyPass        / http://localhost:8787/
   ProxyPassReverse / http://localhost:8787/

  ## EDITS for SSL -- see http://beeznest.wordpress.com/2008/04/25/how-to-configure-https-on-apache-2/ for details
  SSLEngine On
  SSLCertificateFile /usr/share/ca-certificates/crocus.crt
  SSLCertificateKeyFile /etc/ssl/private/crocus.key
  <location />
    SSLRequireSSL On
    SSLVerifyClient optional
    SSLVerifyDepth 1
    SSLOptions +StdEnvVars +StrictRequire
  </Location>
</VirtualHost>