Skip to content

Commit

Permalink
Adding apache
Browse files Browse the repository at this point in the history
  • Loading branch information
marktheunissen committed Aug 22, 2012
1 parent 44dc7b4 commit 349e5cc
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 4 deletions.
19 changes: 19 additions & 0 deletions ubuntu-10.04-lamp-dev/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@

- include: ../common-tasks/mysql-secure.yml

##
# Apache2 setup.
#
- name: Enable some required modules
action: command a2enmod rewrite vhost_alias
tags: common

- name: Apache configuration file for our site
action: template src=templates/etc-apache2-sites-available-devserver.j2 dest=/etc/apache2/sites-available/devserver
tags: common

- name: Disable the default site
action: command a2dissite default
tags: common

- name: Enable our new site
action: command a2ensite devserver
tags: common

##
# Restart services
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
##
# Ansible provided setup. See https://github.com/fourkitchens/server-playbooks.
##

<VirtualHost *:80>
ServerAdmin {{ apache_server_admin }}

DocumentRoot /var/www

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

</VirtualHost>
1 change: 0 additions & 1 deletion ubuntu-10.04-lamp-dev/vars/default-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ mysql_root_password: 'password'

# apache
apache_server_admin: '[email protected]'
apache_server_alias: '*.*.example.com'
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## Ansible provided setup ##
# This server allows a wildcard virtualhost, so for example, going to the address
##
# Ansible provided setup. See https://github.com/fourkitchens/server-playbooks.
##

##
# This server allows a wildcard VirtualHost, so for example, going to:
#
# http:https://pete.training.example.com
# http:https://pete.training.example.com
#
# ... will set the webroot for the request to /home/pete/www/training
#
Expand Down

0 comments on commit 349e5cc

Please sign in to comment.