Commit 523b40fcd1f462bd67fc2062661b5e605779e455
1 parent
aaa0ee68
Exists in
web_steps_improvements
and in
10 other branches
chat: move apache config to virtualhosts file
Showing
4 changed files
with
15 additions
and
19 deletions
Show diff stats
debian/apache2/virtualhost.conf
... | ... | @@ -8,6 +8,14 @@ DocumentRoot "/usr/share/noosfero/public" |
8 | 8 | |
9 | 9 | RewriteEngine On |
10 | 10 | |
11 | +# If your XMPP XMPP/BOSH isn't in localhost, change the config below to correct | |
12 | +# point to address | |
13 | +RewriteRule /http-bind http://localhost:5280/http-bind [P,QSA,L] | |
14 | +<Proxy http://localhost:5280/http-bind> | |
15 | + Order Allow,Deny | |
16 | + Allow from All | |
17 | +</Proxy> | |
18 | + | |
11 | 19 | # Rewrite index to check for static index.html |
12 | 20 | RewriteRule ^/$ /index.html [QSA] |
13 | 21 | ... | ... |
debian/update-noosfero-apache
... | ... | @@ -17,13 +17,13 @@ if test -x /usr/share/noosfero/script/apacheconf; then |
17 | 17 | if ! test -e "$apache_site"; then |
18 | 18 | echo "Generating apache virtual host ..." |
19 | 19 | cd /usr/share/noosfero && su noosfero -c "RAILS_ENV=production ./script/apacheconf virtualhosts" > "$apache_site" |
20 | - else | |
21 | - pattern="Include \/etc\/noosfero\/apache\/virtualhost.conf" | |
22 | - include="Include \/usr\/share\/noosfero\/util\/chat\/apache\/xmpp.conf" | |
23 | - if ! cat $apache_site | grep "^ *$include" > /dev/null ; then | |
24 | - echo "Updating apache virtual host ..." | |
25 | - sed -i "s/.*$pattern.*/ $include\n&/" $apache_site | |
26 | - fi | |
20 | + fi | |
21 | + | |
22 | + # remove old way to include chat config | |
23 | + pattern="Include \/usr\/share\/noosfero\/util\/chat\/apache\/xmpp.conf" | |
24 | + if cat $apache_site | grep "^ *$pattern" > /dev/null ; then | |
25 | + echo "Removing obsolete chat configuration ..." | |
26 | + sed -i "/.*$pattern.*/d" $apache_site | |
27 | 27 | fi |
28 | 28 | |
29 | 29 | echo 'Noosfero Apache configuration updated.' | ... | ... |
script/apacheconf
... | ... | @@ -17,7 +17,6 @@ when 'virtualhosts' |
17 | 17 | puts " #{server_directive} #{domain.name}" |
18 | 18 | server_directive = 'ServerAlias' |
19 | 19 | end |
20 | - puts " Include /usr/share/noosfero/util/chat/apache/xmpp.conf" | |
21 | 20 | puts " Include /etc/noosfero/apache/virtualhost.conf" |
22 | 21 | puts "</VirtualHost>" |
23 | 22 | end | ... | ... |
util/chat/apache/xmpp.conf
... | ... | @@ -1,11 +0,0 @@ |
1 | -# If your XMPP XMPP/BOSH isn't in localhost, change the config below to correct | |
2 | -# point to address | |
3 | - | |
4 | - RewriteEngine On | |
5 | - RewriteRule /http-bind http://localhost:5280/http-bind [P,QSA,L] | |
6 | - <Proxy http://localhost:5280/http-bind> | |
7 | - Order Allow,Deny | |
8 | - Allow from All | |
9 | - </Proxy> | |
10 | - | |
11 | -# vim: ft=apache |