DockerでシンプルにApacheをインストールしたコンテナを作成しました。
DockerFile
1FROM centos 2 3LABEL title="TestApacheImage"\ 4 version="1.0"\ 5 description="test apache" 6 7RUN ["rpm", "--import", "/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7"] 8RUN ["yum", "-y", "install","httpd"] 9 10EXPOSE 80 11 12CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"]
これを以下のコマンドで起動します。
#ビルド docker image build -t apache -f DockerFile . #run(viで開いたとき変な折り返しをしていたので環境変数いじってます) docker container run -it -p 8080:80 -e COLUMNS=$COLUMNS -e LINES=$LINES -e TERM=$TERM apach
するとこのようなエラーが出たので
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
ServerNameを編集するために、/etc/httpd/conf/httpd.conf
をviで開いてみました。
httpd.conf
1# 2# This is the main Apache HTTP server configuration file. It contains the 3# configuration directives that give the server its instructions. 4# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. 5# In particular, see 6# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> 7# for a discussion of each configuration directive. 8# 9# Do NOT simply read the instructions in here without understanding 10# what they do. They're here only as hints or reminders. If you are unsure 11# consult the online docs. You have been warned. 12# 13# Configuration and logfile names: If the filenames you specify for many 14# of the server's control files begin with "/" (or "drive:/" for Win32), the 15# server will use that explicit path. If the filenames do *not* begin 16# with "/", the value of ServerRoot is prepended -- so 'log/access_log' 17# with ServerRoot set to '/www' will be interpreted by the 18# server as '/www/log/access_log', where as '/log/access_log' will be 19# interpreted as '/log/access_log'. 20 21# 22# ServerRoot: The top of the directory tree under which the server's 23# configuration, error, and log files are kept. 24# 25# Do not add a slash at the end of the directory path. If you point 26# ServerRoot at a non-local disk, be sure to specify a local disk on the 27# Mutex directive, if file-based mutexes are used. If you wish to share the 28# same ServerRoot for multiple httpd daemons, you will need to change at 29# least PidFile. 30# 31ServerRoot "/etc/httpd" 32 33# 34# Listen: Allows you to bind Apache to specific IP addresses and/or 35# ports, instead of the default. See also the <VirtualHost> 36# directive. 37# 38# Change this to Listen on specific IP addresses as shown below to 39# prevent Apache from glomming onto all bound IP addresses. 40# 41"/etc/httpd/conf/httpd.conf" 353L, 11753C
するとこのように表示されたのですが、これより先がまったく表示されません。本来この下にServerNameの設定する部分があったと思うのですが、なぜ表示されないのでしょうか?
【追記】
ちなみにDockerはVagrantで立ち上げたLinuxで行っています。git bushで vagrant ssh
しているのですが、その辺も関係あるのでしょうか・・
スクロールしようとすると、どういう現象になりますか?

普通にスクロールできます。ただスクロール先にはなにも書かれていません・・

回答1件
あなたの回答
tips
プレビュー