Commits

Mikhail Korobov committed 01d5fc7

Apache configs are fixed for Ubuntu 10.10

  • Participants
  • Parent commits fe66bf6

Comments (0)

Files changed (2)

File fab_deploy/apache.py

 def _used_ports(lines):
     ports_mapping = dict()
 
-    listen_re = re.compile('^Listen localhost:\s*(?P<port>\d+)')
+    listen_re = re.compile('^Listen (?P<host>.+):\s*(?P<port>\d+)')
     instance_re = re.compile('^# used by (?P<instance>.+)')
 
     for index, line in enumerate(lines):
             lines.extend([
                 '',
                 '# used by ' + env.conf.INSTANCE_NAME,
-                'Listen localhost:' + str(port)
+                'Listen 127.0.0.1:' + str(port)
             ])
             env.conf.APACHE_PORT = port
             puts('Instance is not binded to any port. Binding it to port ' + str(port))

File fab_deploy/config_templates/apache.config

-<VirtualHost *:{{ APACHE_PORT }}>
+NameVirtualHost 127.0.0.1:{{ APACHE_PORT }}
+<VirtualHost 127.0.0.1:{{ APACHE_PORT }}>
     ServerName {{ SERVER_NAME }}
     ServerAlias www.{{ SERVER_NAME }}
     ServerAdmin {{ SERVER_ADMIN }}