Skip to content

Instantly share code, notes, and snippets.

@sterndata
Created March 10, 2016 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sterndata/30855444d97a5e4f16e3 to your computer and use it in GitHub Desktop.
Save sterndata/30855444d97a5e4f16e3 to your computer and use it in GitHub Desktop.
mod_ruid2 virtualhost configuration
<Virtualhost *:80>
ServerName store.sterndata.com
DocumentRoot /var/www/store/wordpress
CustomLog logs/store-access_log combined
ErrorLog logs/store-error_log
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://store.sterndata.com/$1 [R=301,L]
</Virtualhost>
<Virtualhost *:443>
ServerName store.sterndata.com:443
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/store.sterndata.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/store.sterndata.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/store.sterndata.com/chain.pem
DocumentRoot /var/www/store/wordpress
CustomLog logs/store-access_log combined
ErrorLog logs/store-error_log
</VirtualHost>
<Directory /var/www/store/wordpress>
RUidGid www-store www-store
RMode config
AllowOverride All
</Directory>
<VirtualHost *:80>
ServerName xxx1.sterndata.com
DocumentRoot /var/www/xxx1/wordpress
</VirtualHost>
<Directory /var/www/xxx1 >
AllowOverride All
RUidGid www-user1 www-user1
RMode config
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment