9 Commits

Author SHA1 Message Date
Dean Troyer
444a8d53ca Fix Apache site config handling on Fedora
Allow enable/disable_apache_sites() on Fedora to gracefully fail if the
config is not present.  This is primarily an issue when the config from
a previous run is not completely cleaned out (unstack.sh vs clean.sh).

Make APACHE_CONFIG_DIR fully qualified and overrideable in local.conf.

Also fix Horizon's handling of its Apache config file to be removed
in clean.sh.

Change-Id: I78a5de579dd3b02fa2e4e7e00ac0aabe71b531ad
2014-06-06 16:52:20 -05:00
Gabriel Assis Bezerra
a688bc6510 Fix the way Apache site configuration files are used, to improve OS portability
On Ubuntu 14.04, the site configuration file must have a .conf suffix for a2ensite and a2dissite to
recognise it. a2ensite and a2dissite ignore the .conf suffix used as parameter. The default sites'
files are 000-default.conf and default-ssl.conf.

On Ubuntu 12.04, the site configuration file may have any format, as long as it is in
/etc/apache2/sites-available/. a2ensite and a2dissite need the entire file name to work. The default
sites' files are default and default-ssl.

On Fedora, any file in /etc/httpd/conf.d/ whose name ends with .conf is enabled.

On RHEL and CentOS, things should hopefully work as in Fedora.

This change puts all distribution-related site configuration file name differences in lib/apache and
the other services gets the file name for its sites using the new exported function
apache_site_config_for <sitename>.

It also makes Fedora disabled sites use the .conf.disabled suffix instead of removing the .conf from
the file name.

The table below summarizes what should happen on each distribution:
+----------------------+--------------------+--------------------------+--------------------------+
| Distribution         | File name          | Site enabling command    | Site disabling command   |
+----------------------+--------------------+--------------------------+--------------------------+
| Ubuntu 12.04         | site               | a2ensite site            | a2dissite site           |
| Ubuntu 14.04         | site.conf          | a2ensite site            | a2dissite site           |
| Fedora, RHEL, CentOS | site.conf.disabled | mv site.conf{.disabled,} | mv site.conf{,.disabled} |
+----------------------+--------------------+--------------------------+--------------------------+

Change-Id: Ia2ba3cb7caccb6e9b65380f9d51d9d21180b894e
Closes-bug: #1313765
2014-05-30 12:07:24 +00:00
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Dean Troyer
d8864feae9 Fix shocco errors
Clean up comments to fix errors seen while processing with shocco

Change-Id: I0e97ad27613313f03e47c107051ea93b115d4744
2014-02-17 11:18:12 -06:00
Stephan Renatus
e578effb33 Make use of STACK_USER instead of relying on USER
Quite easily one ends up calling ./stack.sh in an environment that,
albeit being user "stack" (for example), doesn't quite meet the
expectations of devstack.  The errors that follow can be rather hard to
track down, as the dependency on `USER` is not mentioned.

To remedy this situation, this commit

- uses STACK_USER instead of USER and
- mentions that dependency in the script headers of lib/*

Change-Id: If4cdc39b922ea64b4c0893a0e695ec06349fccc5
2013-11-19 13:39:58 +01:00
Adam Spiers
6a5aa7c6a2 Fix some Markdown formatting issues
Address miscellaneous issues with Markdown formatting in comments which
are consumed by shocco when generating the online documentation.

Change-Id: I953075cdbddbf1f119c6c7e35f039e2e54b79078
2013-10-24 17:38:19 +01:00
Jamie Lennox
5470701e10 Fix swift httpd on fedora
Implements a fedora equivalent of ubuntu's sites-enabled and moves
enabling of mod_wsgi to the installation period so that it doesn't have
to be handled in a platform dependant way later.

Fixes: bug 1226363
Change-Id: I85325179f1792d985b0375572abfe8c8a82fecc3
2013-09-24 10:48:01 +10:00
Jamie Lennox
5a3d770793 Remove change_apache_user_group function
This function allowed you to change the process running user for all of
apache. This is better handled on a per-process basis.

Change-Id: I165adc0c49fc328f34835856b49983c4e189f143
Fixes: bug 1226346
Fixes: bug 1225853
2013-09-17 11:45:32 +10:00
zhang-hare
d98a5d0a58 enable apache2 server as front end for swift
1.install apache and wsgi module
2.config apache2 vhost and wsgi files for proxy,
account, container and object server.
3.refactor apache functions from horizon and swift
into lib/apache

Change-Id: I3a5d1e511c5dca1e6d01a1adca8fda0a43d4f632
Implements: blueprint enable-apache-frontend-for-swift
2013-07-29 11:15:21 +08:00