Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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