summaryrefslogtreecommitdiffstats
path: root/tools/python/google/platform_utils_mac.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/python/google/platform_utils_mac.py')
-rw-r--r--tools/python/google/platform_utils_mac.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/python/google/platform_utils_mac.py b/tools/python/google/platform_utils_mac.py
index 6603a41..c0a13e8 100644
--- a/tools/python/google/platform_utils_mac.py
+++ b/tools/python/google/platform_utils_mac.py
@@ -81,6 +81,8 @@ class PlatformUtility(object):
cert_file = google.path_utils.FindUpward(self._base_dir, 'tools',
'python', 'google',
'httpd_config', 'httpd2.pem')
+ ssl_enabled = os.path.exists('/etc/apache2/mods-enabled/ssl.conf')
+
httpd_vars = {
"httpd_executable_path":
os.path.join(self._UnixRoot(), "usr", "sbin", exe_name),
@@ -112,12 +114,17 @@ class PlatformUtility(object):
' -C \'User "%(user)s"\''
' -C \'ServerRoot "%(server_root)s"\''
' -c \'LockFile "%(lock_file)s"\''
- ' -c \'SSLCertificateFile "%(ssl_certificate_file)s"\''
- ' -c \'SSLMutex "%(ssl_mutex)s"\''
)
if document_root:
httpd_cmd_string += ' -C \'DocumentRoot "%(document_root)s"\''
+
+ if ssl_enabled:
+ httpd_cmd_string += (
+ ' -c \'SSLCertificateFile "%(ssl_certificate_file)s"\''
+ ' -c \'SSLMutex "%(ssl_mutex)s"\''
+ )
+
# Save a copy of httpd_cmd_string to use for stopping httpd
self._httpd_cmd_string = httpd_cmd_string % httpd_vars