Skip to content

Instantly share code, notes, and snippets.

@khasky
Created July 22, 2020 11:50
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 khasky/c7404ec6b58d6af44afd3c7ec6a7bf04 to your computer and use it in GitHub Desktop.
Save khasky/c7404ec6b58d6af44afd3c7ec6a7bf04 to your computer and use it in GitHub Desktop.
Apache2 VPS http conf
<VirtualHost *:80>
ServerAdmin hello@khasky.com
ServerName khasky.com
ServerAlias www.khasky.com
DocumentRoot /var/www/khasky.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =khasky.com [OR]
RewriteCond %{SERVER_NAME} =www.khasky.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment