Permalink
Browse files

Merge pull request #174 from rightscale/sprint12_10_a64880_allowoverr…

…ide_input

Sprint12 10 a64880 allowoverride input
  • Loading branch information...
2 parents 3aebf92 + 6797ac9 commit f0685193376079005a3e55bc0df353bf8a51e1f4 @Neve Neve committed Nov 29, 2012
@@ -10,6 +10,10 @@
rightscale_marker :begin
+# Include apache2 recipe for correct node values and providers initialization
+# in operational mode
+include_recipe "apache2"
+
log " Configuring vhost file for App server"
# See cookbooks/app_<providers>/providers/default.rb for the "setup_vhost" action.
app "default" do
@@ -116,7 +116,7 @@
docroot project_root
vhost_port django_port.to_s
server_name node[:web_apache][:server_name]
- debug node[:app_django][:debug_mode]
+ allow_override node[:web_apache][:allow_override]
apache_log_dir node[:app_django][:apache][:log_dir]
apache_serve_local_files node[:app_django][:apache][:serve_local_files]
cookbook "app_django"
@@ -43,6 +43,9 @@
WSGIScriptAlias / <%=@params[:docroot]%>/wsgi.py
<Directory "<%=@params[:docroot]%>">
+ AllowOverride <%= @params[:allow_override] %>
+ Order deny,allow
+ Allow from all
<Files wsgi.py>
Order allow,deny
Allow from all
@@ -200,6 +200,7 @@
apache_serve_local_files node[:app_passenger][:apache][:serve_local_files]
passenger_user node[:app][:user]
passenger_group node[:app][:group]
+ allow_override node[:web_apache][:allow_override]
end
end
@@ -23,7 +23,7 @@
<Directory "<%=@params[:docroot]%>">
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>
@@ -93,6 +93,7 @@
docroot project_root
vhost_port php_port.to_s
server_name node[:web_apache][:server_name]
+ allow_override node[:web_apache][:allow_override]
cookbook "web_apache"
end
@@ -291,6 +291,7 @@
docroot apache_docroot
vhost_port port.to_s
server_name node[:web_apache][:server_name]
+ allow_override node[:web_apache][:allow_override]
apache_log_dir node[:apache][:log_dir]
end
@@ -23,7 +23,7 @@
</DirectoryMatch>
<Directory "<%=@params[:docroot]%>">
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>
@@ -52,3 +52,6 @@
# Maintenance mode attributes
set[:web_apache][:maintenance_file] = "/home/webapp/system/maintenance.html"
+
+# Allow override default value
+set_unless[:web_apache][:allow_override] = "None"
@@ -147,6 +147,24 @@
],
"calculated": false,
"type": "string"
+ },
+ "web_apache/allow_override": {
+ "display_name": "AllowOverride Directive",
+ "description": "Allows/disallows the use of .htaccess files in project web root directory. Can be None (default), All, or any directive-type as specified in Apache documentation. Example: None",
+ "required": "optional",
+ "choice": [
+ "None",
+ "All"
+ ],
+ "default": "None",
+ "recipes": [
+ "web_apache::setup_frontend_ssl_vhost",
+ "web_apache::setup_frontend_http_vhost",
+ "web_apache::setup_frontend",
+ "web_apache::default"
+ ],
+ "calculated": false,
+ "type": "string"
}
},
"groupings": {
@@ -106,3 +106,16 @@
"web_apache::setup_frontend",
"web_apache::default"
]
+
+attribute "web_apache/allow_override",
+ :display_name => "AllowOverride Directive",
+ :description => "Allows/disallows the use of .htaccess files in project web root directory. Can be None (default), All, or any directive-type as specified in Apache documentation. Example: None",
+ :required => "optional",
+ :choice => [ "None", "All" ],
+ :default => "None",
+ :recipes => [
+ "web_apache::setup_frontend_ssl_vhost",
+ "web_apache::setup_frontend_http_vhost",
+ "web_apache::setup_frontend",
+ "web_apache::default"
+ ]
@@ -31,6 +31,7 @@
docroot node[:web_apache][:docroot]
vhost_port http_port
server_name node[:web_apache][:server_name]
+ allow_override node[:web_apache][:allow_override]
notifies :restart, resources(:service => "apache2")
end
@@ -88,6 +88,7 @@
ssl_passphrase node[:web_apache][:ssl_passphrase]
ssl_certificate_file ssl_certificate_file
ssl_key_file ssl_key_file
+ allow_override node[:web_apache][:allow_override]
notifies :restart, resources(:service => "apache2")
end
@@ -97,6 +98,7 @@
docroot node[:web_apache][:docroot]
vhost_port http_port
server_name node[:web_apache][:server_name]
+ allow_override node[:web_apache][:allow_override]
notifies :restart, resources(:service => "apache2"), :immediately
end
@@ -18,7 +18,7 @@
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>
@@ -18,7 +18,7 @@
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>
@@ -18,7 +18,7 @@
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>
@@ -18,7 +18,7 @@
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>
@@ -18,7 +18,7 @@
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>
@@ -18,7 +18,7 @@
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
- AllowOverride None
+ AllowOverride <%= @params[:allow_override] %>
Order allow,deny
Allow from all
</Directory>

0 comments on commit f068519

Please sign in to comment.