質問するログイン新規登録

質問編集履歴

1

追記

2017/01/03 12:40

投稿

ryo-dev
ryo-dev

スコア437

title CHANGED
File without changes
body CHANGED
@@ -3,4 +3,228 @@
3
3
  どこにあるのでしょうか?
4
4
  OS:Ubuntu16.04
5
5
  Apache:Apache2
6
- です。
6
+ です。
7
+ ###追記 Apache2.conf
8
+ ```ここに言語を入力
9
+ # This is the main Apache server configuration file. It contains the
10
+ # configuration directives that give the server its instructions.
11
+ # See http://httpd.apache.org/docs/2.4/ for detailed information about
12
+ # the directives and /usr/share/doc/apache2/README.Debian about Debian specific
13
+ # hints.
14
+ #
15
+ #
16
+ # Summary of how the Apache 2 configuration works in Debian:
17
+ # The Apache 2 web server configuration in Debian is quite different to
18
+ # upstream's suggested way to configure the web server. This is because Debian's
19
+ # default Apache2 installation attempts to make adding and removing modules,
20
+ # virtual hosts, and extra configuration directives as flexible as possible, in
21
+ # order to make automating the changes and administering the server as easy as
22
+ # possible.
23
+
24
+ # It is split into several files forming the configuration hierarchy outlined
25
+ # below, all located in the /etc/apache2/ directory:
26
+ #
27
+ # /etc/apache2/
28
+ # |-- apache2.conf
29
+ # | `-- ports.conf
30
+ # |-- mods-enabled
31
+ # | |-- *.load
32
+ # | `-- *.conf
33
+ # |-- conf-enabled
34
+ # | `-- *.conf
35
+ # `-- sites-enabled
36
+ # `-- *.conf
37
+ #
38
+ #
39
+ # * apache2.conf is the main configuration file (this file). It puts the pieces
40
+ # together by including all remaining configuration files when starting up the
41
+ # web server.
42
+ #
43
+ # * ports.conf is always included from the main configuration file. It is
44
+ # supposed to determine listening ports for incoming connections which can be
45
+ # customized anytime.
46
+ #
47
+ # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
48
+ # directories contain particular configuration snippets which manage modules,
49
+ # global configuration fragments, or virtual host configurations,
50
+ # respectively.
51
+ #
52
+ # They are activated by symlinking available configuration files from their
53
+ # respective *-available/ counterparts. These should be managed by using our
54
+ # helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
55
+ # their respective man pages for detailed information.
56
+ #
57
+ # * The binary is called apache2. Due to the use of environment variables, in
58
+ # the default configuration, apache2 needs to be started/stopped with
59
+ # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
60
+ # work with the default configuration.
61
+
62
+
63
+ # Global configuration
64
+ #
65
+
66
+ #
67
+ # ServerRoot: The top of the directory tree under which the server's
68
+ # configuration, error, and log files are kept.
69
+ #
70
+ # NOTE! If you intend to place this on an NFS (or otherwise network)
71
+ # mounted filesystem then please read the Mutex documentation (available
72
+ # at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
73
+ # you will save yourself a lot of trouble.
74
+ #
75
+ # Do NOT add a slash at the end of the directory path.
76
+ #
77
+ #ServerRoot "/etc/apache2"
78
+
79
+ #
80
+ # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
81
+ #
82
+ Mutex file:${APACHE_LOCK_DIR} default
83
+
84
+ #
85
+ # PidFile: The file in which the server should record its process
86
+ # identification number when it starts.
87
+ # This needs to be set in /etc/apache2/envvars
88
+ #
89
+ PidFile ${APACHE_PID_FILE}
90
+
91
+ #
92
+ # Timeout: The number of seconds before receives and sends time out.
93
+ #
94
+ Timeout 300
95
+
96
+ #
97
+ # KeepAlive: Whether or not to allow persistent connections (more than
98
+ # one request per connection). Set to "Off" to deactivate.
99
+ #
100
+ KeepAlive On
101
+
102
+ #
103
+ # MaxKeepAliveRequests: The maximum number of requests to allow
104
+ # during a persistent connection. Set to 0 to allow an unlimited amount.
105
+ # We recommend you leave this number high, for maximum performance.
106
+ #
107
+ MaxKeepAliveRequests 100
108
+
109
+ #
110
+ # KeepAliveTimeout: Number of seconds to wait for the next request from the
111
+ # same client on the same connection.
112
+ #
113
+ KeepAliveTimeout 5
114
+
115
+
116
+ # These need to be set in /etc/apache2/envvars
117
+ User ${APACHE_RUN_USER}
118
+ Group ${APACHE_RUN_GROUP}
119
+
120
+ #
121
+ # HostnameLookups: Log the names of clients or just their IP addresses
122
+ # e.g., www.apache.org (on) or 204.62.129.132 (off).
123
+ # The default is off because it'd be overall better for the net if people
124
+ # had to knowingly turn this feature on, since enabling it means that
125
+ # each client request will result in AT LEAST one lookup request to the
126
+ # nameserver.
127
+ #
128
+ HostnameLookups Off
129
+
130
+ # ErrorLog: The location of the error log file.
131
+ # If you do not specify an ErrorLog directive within a <VirtualHost>
132
+ # container, error messages relating to that virtual host will be
133
+ # logged here. If you *do* define an error logfile for a <VirtualHost>
134
+ # container, that host's errors will be logged there and not here.
135
+ #
136
+ ErrorLog ${APACHE_LOG_DIR}/error.log
137
+
138
+ #
139
+ # LogLevel: Control the severity of messages logged to the error_log.
140
+ # Available values: trace8, ..., trace1, debug, info, notice, warn,
141
+ # error, crit, alert, emerg.
142
+ # It is also possible to configure the log level for particular modules, e.g.
143
+ # "LogLevel info ssl:warn"
144
+ #
145
+ LogLevel warn
146
+
147
+ # Include module configuration:
148
+ IncludeOptional mods-enabled/*.load
149
+ IncludeOptional mods-enabled/*.conf
150
+
151
+ # Include list of ports to listen on
152
+ Include ports.conf
153
+
154
+
155
+ # Sets the default security model of the Apache2 HTTPD server. It does
156
+ # not allow access to the root filesystem outside of /usr/share and /var/www.
157
+ # The former is used by web applications packaged in Debian,
158
+ # the latter may be used for local directories served by the web server. If
159
+ # your system is serving content from a sub-directory in /srv you must allow
160
+ # access here, or in any related virtual host.
161
+ <Directory />
162
+ Options FollowSymLinks
163
+ AllowOverride None
164
+ Require all denied
165
+ </Directory>
166
+
167
+ <Directory /usr/share>
168
+ AllowOverride None
169
+ Require all granted
170
+ </Directory>
171
+
172
+ <Directory /var/www/>
173
+ Options Indexes FollowSymLinks
174
+ AllowOverride None
175
+ Require all granted
176
+ </Directory>
177
+
178
+ #<Directory /srv/>
179
+ # Options Indexes FollowSymLinks
180
+ # AllowOverride None
181
+ # Require all granted
182
+ #</Directory>
183
+
184
+
185
+
186
+
187
+ # AccessFileName: The name of the file to look for in each directory
188
+ # for additional configuration directives. See also the AllowOverride
189
+ # directive.
190
+ #
191
+ AccessFileName .htaccess
192
+
193
+ #
194
+ # The following lines prevent .htaccess and .htpasswd files from being
195
+ # viewed by Web clients.
196
+ #
197
+ <FilesMatch "^.ht">
198
+ Require all denied
199
+ </FilesMatch>
200
+
201
+
202
+ #
203
+ # The following directives define some format nicknames for use with
204
+ # a CustomLog directive.
205
+ #
206
+ # These deviate from the Common Log Format definitions in that they use %O
207
+ # (the actual bytes sent including headers) instead of %b (the size of the
208
+ # requested file), because the latter makes it impossible to detect partial
209
+ # requests.
210
+ #
211
+ # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
212
+ # Use mod_remoteip instead.
213
+ #
214
+ LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
215
+ LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
216
+ LogFormat "%h %l %u %t \"%r\" %>s %O" common
217
+ LogFormat "%{Referer}i -> %U" referer
218
+ LogFormat "%{User-agent}i" agent
219
+
220
+ # Include of directories ignores editors' and dpkg's backup files,
221
+ # see README.Debian for details.
222
+
223
+ # Include generic snippets of statements
224
+ IncludeOptional conf-enabled/*.conf
225
+
226
+ # Include the virtual host configurations:
227
+ IncludeOptional sites-enabled/*.conf
228
+
229
+ # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
230
+ ```