Skip to content

Instantly share code, notes, and snippets.

@dbolser
Created September 25, 2019 12:10
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 dbolser/5751f7496eab56558ad6e65bfe2cc209 to your computer and use it in GitHub Desktop.
Save dbolser/5751f7496eab56558ad6e65bfe2cc209 to your computer and use it in GitHub Desktop.
/etc/apache2/sites-enabled/mediawiki.conf
<VirtualHost *:80>
ServerAdmin admin@geromics
DocumentRoot /var/www/html/mediawiki/
ServerName geromics
ServerAlias www.geromics.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/html/mediawiki/images">
# Ignore .htaccess files
AllowOverride None
# Serve HTML as plaintext, don't execute SHTML
AddType text/plain .html .htm .shtml .phtml .php .php3 .php4 .php5 .php7
# Don't run arbitrary PHP code.
php_admin_flag engine off
# If you've other scripting languages, disable them too.
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment