質問編集履歴
1
conf/httpd.conf中身記述
title
CHANGED
File without changes
|
body
CHANGED
@@ -39,4 +39,218 @@
|
|
39
39
|
Rails 6.0.3.4
|
40
40
|
ruby 2.6.5p114
|
41
41
|
nginx 1.12.2
|
42
|
-
unicorn 5.8.0
|
42
|
+
unicorn 5.8.0
|
43
|
+
|
44
|
+
###追記
|
45
|
+
conf/httpd.confの中身です。※字数制限のため、コメントアウト部を一部添削しています。
|
46
|
+
```
|
47
|
+
ServerRoot "/etc/httpd"
|
48
|
+
|
49
|
+
Listen 80
|
50
|
+
|
51
|
+
Include conf.modules.d/*.conf
|
52
|
+
|
53
|
+
User apache
|
54
|
+
Group apache
|
55
|
+
|
56
|
+
ServerAdmin root@localhost
|
57
|
+
|
58
|
+
<Directory />
|
59
|
+
AllowOverride none
|
60
|
+
Require all denied
|
61
|
+
</Directory>
|
62
|
+
#
|
63
|
+
# Note that from this point forward you must specifically allow
|
64
|
+
# particular features to be enabled - so if something's not working as
|
65
|
+
# you might expect, make sure that you have specifically enabled it
|
66
|
+
# below.
|
67
|
+
#
|
68
|
+
#
|
69
|
+
# DocumentRoot: The directory out of which you will serve your
|
70
|
+
# documents. By default, all requests are taken from this directory, but
|
71
|
+
# symbolic links and aliases may be used to point to other locations.
|
72
|
+
#
|
73
|
+
DocumentRoot "/var/www/html"
|
74
|
+
#
|
75
|
+
# Relax access to content within /var/www.
|
76
|
+
#
|
77
|
+
<Directory "/var/www">
|
78
|
+
AllowOverride None
|
79
|
+
# Allow open access:
|
80
|
+
Require all granted
|
81
|
+
</Directory>
|
82
|
+
# Further relax access to the default document root:
|
83
|
+
<Directory "/var/www/html">
|
84
|
+
Options Indexes FollowSymLinks
|
85
|
+
AllowOverride None
|
86
|
+
</Directory>
|
87
|
+
#
|
88
|
+
#
|
89
|
+
# DirectoryIndex: sets the file that Apache will serve if a directory
|
90
|
+
# is requested.
|
91
|
+
#
|
92
|
+
<IfModule dir_module>
|
93
|
+
DirectoryIndex index.html
|
94
|
+
</IfModule>
|
95
|
+
#
|
96
|
+
# The following lines prevent .htaccess and .htpasswd files from being
|
97
|
+
# viewed by Web clients.
|
98
|
+
#
|
99
|
+
<Files ".ht*">
|
100
|
+
Require all denied
|
101
|
+
</Files>
|
102
|
+
#
|
103
|
+
# ErrorLog: The location of the error log file.
|
104
|
+
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
105
|
+
# container, error messages relating to that virtual host will be
|
106
|
+
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
107
|
+
# container, that host's errors will be logged there and not here.
|
108
|
+
#
|
109
|
+
ErrorLog "logs/error_log"
|
110
|
+
#
|
111
|
+
# LogLevel: Control the number of messages logged to the error_log.
|
112
|
+
# Possible values include: debug, info, notice, warn, error, crit,
|
113
|
+
# alert, emerg.
|
114
|
+
#
|
115
|
+
LogLevel warn
|
116
|
+
<IfModule log_config_module>
|
117
|
+
#
|
118
|
+
# The following directives define some format nicknames for use with
|
119
|
+
# a CustomLog directive (see below).
|
120
|
+
#
|
121
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
122
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
123
|
+
<IfModule logio_module>
|
124
|
+
# You need to enable mod_logio.c to use %I and %O
|
125
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
126
|
+
</IfModule>
|
127
|
+
CustomLog "logs/access_log" combined
|
128
|
+
</IfModule>
|
129
|
+
<IfModule alias_module>
|
130
|
+
#
|
131
|
+
# Redirect: Allows you to tell clients about documents that used to
|
132
|
+
# exist in your server's namespace, but do not anymore. The client
|
133
|
+
# will make a new request for the document at its new location.
|
134
|
+
# Example:
|
135
|
+
# Redirect permanent /foo http://www.example.com/bar
|
136
|
+
#
|
137
|
+
# Alias: Maps web paths into filesystem paths and is used to
|
138
|
+
# access content that does not live under the DocumentRoot.
|
139
|
+
# Example:
|
140
|
+
# Alias /webpath /full/filesystem/path
|
141
|
+
#
|
142
|
+
# If you include a trailing / on /webpath then the server will
|
143
|
+
# require it to be present in the URL. You will also likely
|
144
|
+
# need to provide a <Directory> section to allow access to
|
145
|
+
# the filesystem path.
|
146
|
+
#
|
147
|
+
# ScriptAlias: This controls which directories contain server scripts.
|
148
|
+
# ScriptAliases are essentially the same as Aliases, except that
|
149
|
+
# documents in the target directory are treated as applications and
|
150
|
+
# run by the server when requested rather than as documents sent to the
|
151
|
+
# client. The same rules about trailing "/" apply to ScriptAlias
|
152
|
+
# directives as to Alias.
|
153
|
+
#
|
154
|
+
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
|
155
|
+
|
156
|
+
</IfModule>
|
157
|
+
#
|
158
|
+
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
|
159
|
+
# CGI directory exists, if you have that configured.
|
160
|
+
#
|
161
|
+
<Directory "/var/www/cgi-bin">
|
162
|
+
AllowOverride None
|
163
|
+
Options None
|
164
|
+
Require all granted
|
165
|
+
</Directory>
|
166
|
+
<IfModule mime_module>
|
167
|
+
#
|
168
|
+
# TypesConfig points to the file containing the list of mappings from
|
169
|
+
# filename extension to MIME-type.
|
170
|
+
#
|
171
|
+
TypesConfig /etc/mime.types
|
172
|
+
#
|
173
|
+
# AddType allows you to add to or override the MIME configuration
|
174
|
+
# file specified in TypesConfig for specific file types.
|
175
|
+
#
|
176
|
+
#AddType application/x-gzip .tgz
|
177
|
+
#
|
178
|
+
# AddEncoding allows you to have certain browsers uncompress
|
179
|
+
# information on the fly. Note: Not all browsers support this.
|
180
|
+
#
|
181
|
+
#AddEncoding x-compress .Z
|
182
|
+
#AddEncoding x-gzip .gz .tgz
|
183
|
+
#
|
184
|
+
# If the AddEncoding directives above are commented-out, then you
|
185
|
+
# probably should define those extensions to indicate media types:
|
186
|
+
#
|
187
|
+
AddType application/x-compress .Z
|
188
|
+
AddType application/x-gzip .gz .tgz
|
189
|
+
#
|
190
|
+
# AddHandler allows you to map certain file extensions to "handlers":
|
191
|
+
# actions unrelated to filetype. These can be either built into the server
|
192
|
+
# or added with the Action directive (see below)
|
193
|
+
#
|
194
|
+
# To use CGI scripts outside of ScriptAliased directories:
|
195
|
+
# (You will also need to add "ExecCGI" to the "Options" directive.)
|
196
|
+
#
|
197
|
+
#AddHandler cgi-script .cgi
|
198
|
+
# For type maps (negotiated resources):
|
199
|
+
#AddHandler type-map var
|
200
|
+
#
|
201
|
+
# Filters allow you to process content before it is sent to the client.
|
202
|
+
#
|
203
|
+
# To parse .shtml files for server-side includes (SSI):
|
204
|
+
# (You will also need to add "Includes" to the "Options" directive.)
|
205
|
+
#
|
206
|
+
AddType text/html .shtml
|
207
|
+
AddOutputFilter INCLUDES .shtml
|
208
|
+
</IfModule>
|
209
|
+
#
|
210
|
+
# Specify a default charset for all content served; this enables
|
211
|
+
# interpretation of all content as UTF-8 by default. To use the
|
212
|
+
# default browser choice (ISO-8859-1), or to allow the META tags
|
213
|
+
# in HTML content to override this choice, comment out this
|
214
|
+
# directive:
|
215
|
+
#
|
216
|
+
AddDefaultCharset UTF-8
|
217
|
+
<IfModule mime_magic_module>
|
218
|
+
#
|
219
|
+
# The mod_mime_magic module allows the server to use various hints from the
|
220
|
+
# contents of the file itself to determine its type. The MIMEMagicFile
|
221
|
+
# directive tells the module where the hint definitions are located.
|
222
|
+
#
|
223
|
+
MIMEMagicFile conf/magic
|
224
|
+
</IfModule>
|
225
|
+
#
|
226
|
+
# Customizable error responses come in three flavors:
|
227
|
+
# 1) plain text 2) local redirects 3) external redirects
|
228
|
+
#
|
229
|
+
# Some examples:
|
230
|
+
#ErrorDocument 500 "The server made a boo boo."
|
231
|
+
#ErrorDocument 404 /missing.html
|
232
|
+
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
|
233
|
+
#ErrorDocument 402 http://www.example.com/subscription_info.html
|
234
|
+
#
|
235
|
+
#
|
236
|
+
# EnableMMAP and EnableSendfile: On systems that support it,
|
237
|
+
# memory-mapping or the sendfile syscall may be used to deliver
|
238
|
+
# files. This usually improves server performance, but must
|
239
|
+
# be turned off when serving from networked-mounted
|
240
|
+
# filesystems or if support for these functions is otherwise
|
241
|
+
# broken on your system.
|
242
|
+
# Defaults if commented: EnableMMAP On, EnableSendfile Off
|
243
|
+
#
|
244
|
+
#EnableMMAP off
|
245
|
+
EnableSendfile on
|
246
|
+
# Enable HTTP/2 by default
|
247
|
+
#
|
248
|
+
# https://httpd.apache.org/docs/2.4/mod/core.html#protocols
|
249
|
+
<IfModule mod_http2.c>
|
250
|
+
Protocols h2 h2c http/1.1
|
251
|
+
</IfModule>
|
252
|
+
# Supplemental configuration
|
253
|
+
#
|
254
|
+
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
255
|
+
IncludeOptional conf.d/*.conf
|
256
|
+
```
|