Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sympl
Sympl
Commits
4d7e527f
Commit
4d7e527f
authored
Feb 08, 2012
by
Patrick J Cherry
Browse files
ServerAliases and symlinks are now handled sanely.
parent
c77ca96f
Changes
8
Hide whitespace changes
Inline
Side-by-side
apache/apache.d/non_ssl.template.erb
View file @
4d7e527f
...
...
@@ -21,10 +21,12 @@ NameVirtualHost <%= ip %>:80
#
ServerName
<%=
domain
%>
#
# And server alias in place
#
ServerAlias www.
<%=
domain
%>
<%=
server_aliases
%>
#
# Allow users to override settings via .htaccess
...
...
apache/apache.d/ssl.template.erb
View file @
4d7e527f
...
...
@@ -26,10 +26,11 @@ NameVirtualHost <%= ip %>:80
#
ServerName
<%=
domain
%>
#
# And server alias in place
#
S
erver
A
lias
www.
<%=
domain
%>
<%=
s
erver
_a
lias
es
%>
SSLEngine On
...
...
@@ -87,10 +88,12 @@ NameVirtualHost <%= ip %>:80
#
ServerName
<%=
domain
%>
#
# And server alias in place
#
ServerAlias www.
<%=
domain
%>
<%=
server_aliases
%>
% if mandatory_ssl?
#
...
...
apache/apache.d/webalizer.conf.erb
View file @
4d7e527f
...
...
@@ -192,7 +192,7 @@ PageType php
# "yes" or "no". Default is "no". Note: this does not suppress
# warnings and errors (which are printed to stderr).
#
Quiet
no
Quiet
yes
# ReallyQuiet will supress all messages including errors and
# warnings. Values can be 'yes' or 'no' with 'no' being the
...
...
@@ -377,13 +377,16 @@ PageType php
# "*mama.com" and "www.your*" will all match.
# Your own site should be hidden
HideSite
<%=
domain
%>
HideSite www.
<%=
domain
%>
HideSite localhost
% domain.aliases.each do |domain_alias|
HideSite
<%=
domain_alias
%>
HideReferrer
<%=
domain_alias
%>
/
% end
#
Your own site gives most referrals
HideReferrer
<%=
domain
%>
/
Hide
Referrer www.
<%=
domain
%>
/
#
# Also hide localhost.
Hide
Site localhost
# This one hides non-referrers ("-" Direct requests)
HideReferrer Direct Request
...
...
apache/debian/changelog
View file @
4d7e527f
...
...
@@ -10,8 +10,11 @@ symbiosis-httpd (2012:0208) stable; urgency=low
* Fixed verbose logging in symbiosis-create-mass-hosting-sites
* Fixed force recreate in symbiosis-make-logs
* Postinst now removes old SSL configuration test if present.
* ServerAliases are now added when they actually exist as symlinks.
* Symlinks are handled better by logging -- extra filehandles are not
opened.
-- Patrick J Cherry <patrick@bytemark.co.uk>
Tue
, 0
7
Feb 2012 1
7:10:47
+0000
-- Patrick J Cherry <patrick@bytemark.co.uk>
Wed
, 0
8
Feb 2012 1
5:23:32
+0000
symbiosis-httpd (2012:0202) stable; urgency=low
...
...
apache/lib/symbiosis/config_files/apache.rb
View file @
4d7e527f
...
...
@@ -194,6 +194,14 @@ module Symbiosis
end
end
#
#
# Return a ServerAlias snippet for all server aliases for a domain.
#
def
server_aliases
domain
.
aliases
.
collect
{
|
a
|
"ServerAlias
#{
a
}
"
}.
join
(
"
\n
"
)
end
#
# Returns the certificate, key, and bundle configuration lines.
#
...
...
apache/sbin/symbiosis-apache-logger
View file @
4d7e527f
...
...
@@ -278,11 +278,6 @@ processing_thread = Thread.new do
# unless the domain is sane. We can only do this if we're root.
#
if 0 == Process.uid and (domain = Symbiosis::Domains.find(domain_name))
#
# Change the domain name to the correct one.
#
domain_name = domain.name
#
# Fetch the log filename
#
...
...
apache/sbin/symbiosis-create-sites
View file @
4d7e527f
...
...
@@ -171,6 +171,11 @@ Symbiosis::Domains.each do |domain|
next unless domains_to_configure.empty? or domains_to_configure.include?(domain.name)
if domain.is_alias?
verbose "\tSkipping as #{domain.symlink} is a link to #{domain.directory}."
next
end
begin
sites_available_file = File.join(apache2_dir, "sites-available","#{domain.name}.conf")
sites_enabled_file = File.join(apache2_dir, "sites-enabled","#{domain.name}.conf")
...
...
apache/sbin/symbiosis-generate-stats
View file @
4d7e527f
...
...
@@ -139,8 +139,8 @@ Symbiosis::Domains.each do |domain|
#
# Skip symlinks
#
if (
File.symlink?(domain.directory)
)
verbose "\tSkipping as it is a symlink
elsewhere
."
if (
domain.is_alias?
)
verbose "\tSkipping as it is a
n
symlink
to #{domain.directory}
."
next
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment