Closed raphaelstolt closed 8 years ago
Can you provide more informations? Please attach the apache configuration.
The Apache config /opt/docker/etc/httpd/global.conf
on the app
container looks like the following:
# Settings
TimeOut 1000
ServerName "f66ccf4ce501"
DirectoryIndex index.php
DocumentRoot "/app/web/"
<Directory "/app/web/">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog
CustomLog /proc/self/fd/1 dockerlog
ErrorLog /proc/self/fd/2
#######################################
# Faster error documents
#######################################
<Location ~ "(\.jpeg|\.jpg|\.gif|\.png|\.ico|\.js|\.css|\.map|\.json|\.xml|robots\.txt)$">
ErrorDocument 400 "400 Bad Request"
ErrorDocument 401 "401 Unauthorized"
ErrorDocument 403 "403 Forbidden"
ErrorDocument 404 "404 Not Found"
ErrorDocument 405 "405 Method Not Allowed"
ErrorDocument 500 "500 Internal Server Error"
ErrorDocument 501 "501 Not Implemented"
ErrorDocument 502 "502 Bad Gateway"
ErrorDocument 503 "503 Service Unavailable"
</Location>
From the Docker log it also seems that the ServerName value is not set correctly, would expect to see the value configured in application.development.yml there.
changed: [localhost] => (item=[{u'variable': u'SERVERNAME', u'value': u'f66ccf4ce501'}, u'/opt/docker/etc/httpd/global.conf'])
ok: [localhost] => (item=[{u'variable': u'SERVERNAME', u'value': u'f66ccf4ce501'}, u'/opt/docker/etc/httpd/main.conf'])
ok: [localhost] => (item=[{u'variable': u'SERVERNAME', u'value': u'f66ccf4ce501'}, u'/opt/docker/etc/httpd/php.conf'])
ok: [localhost] => (item=[{u'variable': u'SERVERNAME', u'value': u'f66ccf4ce501'}, u'/opt/docker/etc/httpd/vhost.common.conf'])
ok: [localhost] => (item=[{u'variable': u'SERVERNAME', u'value': u'f66ccf4ce501'}, u'/opt/docker/etc/httpd/vhost.conf'])
ok: [localhost] => (item=[{u'variable': u'SERVERNAME', u'value': u'f66ccf4ce501'}, u'/opt/docker/etc/httpd/vhost.ssl.conf'])
Though just noticed that in /opt/docker/etc/httpd/vhost.conf
the value is correctly expanded.
So why is this closed w/o comment?
This issue is not fixed? I thought that this issue is fixed.
The Apache ServerName is the global host name of the Apache server and will be set to the hostname of the current docker Container.
There are vhosts with your which uses the *.vm domains which also overwrite the ServerName inside.
There is now a modular apache configuration available by using /opt/docker/etc/httpd/conf.d
for global configuration and /opt/docker/etc/httpd/vhost.common.d
for vhost configuration.
For more informations see http://dockerfile.readthedocs.io/en/latest/content/DockerImages/dockerfiles/apache.html
I used the
5.0.0
release from a Windows box and noticed that the Apache ServerName configuration contains some sort of hash instead of the defaultdocker.vm
value.