Skip to content

Instantly share code, notes, and snippets.

@sterndata
Created March 21, 2021 15:14
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/f27fb487ea9442e02379a668e10cd08b to your computer and use it in GitHub Desktop.
Save sterndata/f27fb487ea9442e02379a668e10cd08b to your computer and use it in GitHub Desktop.
apache config
VirtualHost *:80>
ServerName www.sterndata.com
ServerAlias sterndata.com
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.sterndata.com$1 [R=301,L]
CustomLog /var/log/httpd/www.sterndata.com_access_log combined
ErrorLog /var/log/httpd/www.sterndata.com_error_log
</VirtualHost>
<VirtualHost *:443>
ServerName www.sterndata.com
ServerAlias sterndata.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/sterndata.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/sterndata.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/sterndata.com/chain.pem
DocumentRoot /var/www/www.sterndata.com/wordpress
CustomLog /var/log/httpd/www.sterndata.com_access_log combined
ErrorLog /var/log/httpd/www.sterndata.com_error_log
Protocols h2 h2c http/1.1
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix://var/run/php-fpm/www.sterndata.com.sock|fcgi://127.0.0.1:9000/var/www/www.sterndata.com/wordpress timeout=300
<Directory /var/www/www.sterndata.com>
AllowOverride All
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment