Skip to content

Instantly share code, notes, and snippets.

@paulobatista
Created November 9, 2018 18:23
Show Gist options
  • Select an option

  • Save paulobatista/cfff525a9eb17aac5037b86e6d584c24 to your computer and use it in GitHub Desktop.

Select an option

Save paulobatista/cfff525a9eb17aac5037b86e6d584c24 to your computer and use it in GitHub Desktop.

OS: Ubuntu 16.04, but it should works on other distros and versions.

sudo apt update && sudo apt install -y apache2 
sudo nano /etc/apache2/sites-available/basic-php-example.conf
  • Paste the following text in the file, changing the two your_directory_here with the template's folder.
# Ensure that Apache listens on port 80
Listen 80
<VirtualHost *:80>
        DocumentRoot "your_directory_here"
        ServerName localhost
        <Directory "your_directory_here">
                Options Indexes FollowSymLinks
                AllowOverride None
                Require all granted
      </Directory>

</VirtualHost>
sudo a2ensite basic-php-example.conf
sudo systemctl restart apache2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment