Last active
August 29, 2015 14:01
-
-
Save casecode/02c354be7fa1c14b0f1e to your computer and use it in GitHub Desktop.
Basic Apache2 + Passenger Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SSL config file at /etc/apache2/sites-available/default-ssl.config | |
# After saving the config file, remember to enable the virtual host and restart apache | |
# sudo a2ensite default-ssl | |
# sudo service apache2 reload | |
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerAdmin email@your_domain.com | |
ServerName your_domain.com # localhost:3000, etc., if using SSL in development | |
ServerAlias www.your_domain.com # optional | |
RailsEnv your_environment # production, staging, etc. | |
PassengerRuby /path/to/ruby # e.g. /usr/local/bin/ruby | |
DocumentRoot /path/to/your_app/public # must direct to the 'public' directory | |
# Examples: | |
# In production: /var/www/your_app/current/public | |
# In development using Vagrant box: /vagrant/your_app/public | |
SSLEngine on | |
SSLCertificateFile /path/to/your_cert.crt # e.g. /etc/apache2/ssl/your_cert.crt | |
SSLCertificateKeyFile /path/to/your_key.key # e.g. /etc/apache2/ssl/server.key | |
# If using a trusted authority that provides a chain file, then add SSLCertificateChainFile | |
# Comment out if using openssl, as there will not be a chain file | |
SSLCertificateChainFile /path/to/your_chain_file.crt # e.g. /etc/apache2/ssl/bundle.crt | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment