Skip to content

Instantly share code, notes, and snippets.

@elclanrs
Last active May 16, 2017 20:45
Show Gist options
  • Select an option

  • Save elclanrs/e2eb6b1498bb92b8439356227a39ab40 to your computer and use it in GitHub Desktop.

Select an option

Save elclanrs/e2eb6b1498bb92b8439356227a39ab40 to your computer and use it in GitHub Desktop.

Revisions

  1. elclanrs revised this gist May 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    apt update
    apt install -y lamp-server^
    apt install -y phpmyadmin
    a2enmod rewrite
    a2enmod rewrite # to use permalinks and htaccess
    service apache2 restart
    adduser vagrant www-data
    ```
  2. elclanrs renamed this gist May 16, 2017. 1 changed file with 11 additions and 6 deletions.
    17 changes: 11 additions & 6 deletions Apache install for WordPress → README.md
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,27 @@
    #!/bin/bash
    1) Install dependencies

    ```sh
    apt update
    apt install -y lamp-server^
    apt install -y phpmyadmin
    a2enmod rewrite
    service apache2 restart
    adduser vagrant www-data
    ```

    echo "<VirtualHost *:80>
    2) Edit `/etc/apache/sites-enabled/000-default.conf`:

    ```
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /vagrant/wordpress
    DocumentRoot /var/www/html
    <Directory /vagrant/wordpress/>
    <Directory /var/www/html/>
    AllowOverride All
    Require all granted
    EnableSendfile off
    </Directory>
    ErrorLog \${APACHE_LOG_DIR}/error.log
    CustomLog \${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>" > /etc/apache2/sites-enabled/000-default.conf
    </VirtualHost>
    ```
  3. elclanrs revised this gist May 16, 2017. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Apache install for WordPress
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,6 @@
    apt update
    apt install -y lamp-server^
    apt install -y phpmyadmin
    apt install -y vim
    a2enmod rewrite
    service apache2 restart
    adduser vagrant www-data
  4. elclanrs created this gist May 16, 2017.
    23 changes: 23 additions & 0 deletions Apache install for WordPress
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/bin/bash

    apt update
    apt install -y lamp-server^
    apt install -y phpmyadmin
    apt install -y vim
    a2enmod rewrite
    service apache2 restart
    adduser vagrant www-data

    echo "<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /vagrant/wordpress
    <Directory /vagrant/wordpress/>
    AllowOverride All
    Require all granted
    EnableSendfile off
    </Directory>
    ErrorLog \${APACHE_LOG_DIR}/error.log
    CustomLog \${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>" > /etc/apache2/sites-enabled/000-default.conf