Skip to content

Instantly share code, notes, and snippets.

@ukadev
Last active November 6, 2022 16:24
Show Gist options
  • Save ukadev/8d0bd5bf7885d64b8d5bff3f78938483 to your computer and use it in GitHub Desktop.
Save ukadev/8d0bd5bf7885d64b8d5bff3f78938483 to your computer and use it in GitHub Desktop.
rm /etc/apache2/sites-available/000-default.conf
cat >> /etc/apache2/sites-available/000-default.conf << EOF
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/public
<Directory /var/www/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
EOF
service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment