質問編集履歴
3
コードブロックに変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -21,7 +21,277 @@
|
|
21
21
|
追記:
|
22
22
|
現在のhttpd.confのコードです。
|
23
23
|
↓↓↓↓↓↓↓
|
24
|
-
https://www.evernote.com/shard/s25/sh/82a7a0ab-9ad9-4691-937d-db2ac16c30cf/9b849b940eaf2840d403a8bf3d4d8f8d
|
25
24
|
|
25
|
+
```ここに言語を入力
|
26
|
+
中略
|
27
|
+
#
|
28
|
+
ServerRoot "/etc/httpd"
|
26
29
|
|
30
|
+
#
|
31
|
+
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
32
|
+
# ports, instead of the default. See also the <VirtualHost>
|
33
|
+
# directive.
|
34
|
+
#
|
35
|
+
# Change this to Listen on specific IP addresses as shown below to
|
36
|
+
# prevent Apache from glomming onto all bound IP addresses.
|
37
|
+
#
|
38
|
+
#Listen 12.34.56.78:80
|
39
|
+
Listen 80
|
40
|
+
|
41
|
+
#
|
42
|
+
# Dynamic Shared Object (DSO) Support
|
43
|
+
#
|
44
|
+
# To be able to use the functionality of a module which was built as a DSO you
|
45
|
+
# have to place corresponding `LoadModule' lines at this location so the
|
46
|
+
# directives contained in it are actually available _before_ they are used.
|
47
|
+
|
48
|
+
中略
|
49
|
+
|
50
|
+
#
|
51
|
+
# ServerRoot: The top of the directory tree under which the server's
|
52
|
+
# configuration, error, and log files are kept.
|
53
|
+
#
|
54
|
+
# Do not add a slash at the end of the directory path. If you point
|
55
|
+
# ServerRoot at a non-local disk, be sure to specify a local disk on the
|
56
|
+
# Mutex directive, if file-based mutexes are used. If you wish to share the
|
57
|
+
# same ServerRoot for multiple httpd daemons, you will need to change at
|
58
|
+
# least PidFile.
|
59
|
+
|
60
|
+
#
|
61
|
+
ServerRoot "/etc/httpd"
|
62
|
+
|
63
|
+
#
|
64
|
+
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
65
|
+
# ports, instead of the default. See also the <VirtualHost>
|
66
|
+
# directive.
|
67
|
+
#
|
68
|
+
# Change this to Listen on specific IP addresses as shown below to
|
69
|
+
# prevent Apache from glomming onto all bound IP addresses.
|
70
|
+
#
|
71
|
+
#Listen 12.34.56.78:80
|
72
|
+
Listen 80
|
73
|
+
|
74
|
+
中略
|
75
|
+
|
76
|
+
Include conf.modules.d/*.conf
|
77
|
+
|
78
|
+
#
|
79
|
+
# If you wish httpd to run as a different user or group, you must run
|
80
|
+
# httpd as root initially and it will switch.
|
81
|
+
#
|
82
|
+
# User/Group: The name (or #number) of the user/group to run httpd as.
|
83
|
+
# It is usually good practice to create a dedicated user and group for
|
84
|
+
# running httpd, as with most system services.
|
85
|
+
#
|
86
|
+
User apache
|
87
|
+
Group apache
|
88
|
+
|
89
|
+
中略
|
90
|
+
|
91
|
+
#
|
92
|
+
# ServerAdmin: Your address, where problems with the server should be
|
93
|
+
# e-mailed. This address appears on some server-generated pages, such
|
94
|
+
# as error documents. e.g. admin@your-domain.com
|
95
|
+
#
|
96
|
+
ServerAdmin root@localhost
|
97
|
+
|
98
|
+
#
|
99
|
+
# ServerName gives the name and port that the server uses to identify itself.
|
100
|
+
# This can often be determined automatically, but we recommend you specify
|
101
|
+
# it explicitly to prevent problems during startup.
|
102
|
+
# If your host doesn't have a registered DNS name, enter its IP address here.
|
103
|
+
#
|
104
|
+
#ServerName www.example.com:80
|
105
|
+
|
106
|
+
#
|
107
|
+
# Deny access to the entirety of your server's filesystem. You must
|
108
|
+
# explicitly permit access to web content directories in other
|
109
|
+
# <Directory> blocks below.
|
110
|
+
#
|
111
|
+
<Directory />
|
112
|
+
AllowOverride none
|
113
|
+
Require all denied
|
114
|
+
</Directory>
|
115
|
+
|
116
|
+
#
|
117
|
+
# Note that from this point forward you must specifically allow
|
118
|
+
# particular features to be enabled - so if something's not working as
|
119
|
+
# you might expect, make sure that you have specifically enabled it
|
120
|
+
# below.
|
121
|
+
#
|
122
|
+
|
123
|
+
#
|
124
|
+
# DocumentRoot: The directory out of which you will serve your
|
125
|
+
# documents. By default, all requests are taken from this directory, but
|
126
|
+
# symbolic links and aliases may be used to point to other locations.
|
127
|
+
#
|
128
|
+
DocumentRoot "/var/www/html"
|
129
|
+
|
130
|
+
#
|
131
|
+
# Relax access to content within /var/www.
|
132
|
+
#
|
133
|
+
<Directory "/var/www">
|
134
|
+
AllowOverride All
|
135
|
+
# Allow open access:
|
136
|
+
Require all granted
|
137
|
+
</Directory>
|
138
|
+
|
139
|
+
# Further relax access to the default document root:
|
140
|
+
DocumentRoot "/var/www/html"
|
141
|
+
<Directory "/var/www/html">
|
142
|
+
# or any combination of:
|
143
|
+
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
144
|
+
#
|
145
|
+
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
146
|
+
# doesn't give it to you.
|
147
|
+
#
|
148
|
+
# The Options directive is both complicated and important. Please see
|
149
|
+
# http://httpd.apache.org/docs/2.4/mod/core.html#options
|
150
|
+
# for more information.
|
151
|
+
#
|
152
|
+
Options Indexes FollowSymLinks
|
153
|
+
|
154
|
+
#
|
155
|
+
#
|
156
|
+
# AllowOverride controls what directives may be placed in .htaccess files.
|
157
|
+
# It can be "All", "None", or any combination of the keywords:
|
158
|
+
# Options FileInfo AuthConfig Limit
|
159
|
+
#
|
160
|
+
AllowOverride All
|
161
|
+
|
162
|
+
#
|
163
|
+
# Controls who can get stuff from this server.
|
164
|
+
#
|
165
|
+
Require all granted
|
166
|
+
</Directory>
|
167
|
+
|
168
|
+
#
|
169
|
+
# DirectoryIndex: sets the file that Apache will serve if a directory
|
170
|
+
# is requested.
|
171
|
+
#
|
172
|
+
<IfModule dir_module>
|
173
|
+
DirectoryIndex index.html
|
174
|
+
</IfModule>
|
175
|
+
|
176
|
+
#
|
177
|
+
# The following lines prevent .htaccess and .htpasswd files from being
|
178
|
+
# viewed by Web clients.
|
179
|
+
#
|
180
|
+
<Files ".ht*">
|
181
|
+
Require all denied
|
182
|
+
</Files>
|
183
|
+
|
184
|
+
中略
|
185
|
+
|
186
|
+
LogLevel warn
|
187
|
+
|
188
|
+
<IfModule log_config_module>
|
189
|
+
#
|
190
|
+
# The following directives define some format nicknames for use with
|
191
|
+
# a CustomLog directive (see below).
|
192
|
+
#
|
193
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
194
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
195
|
+
|
196
|
+
<IfModule logio_module>
|
197
|
+
# You need to enable mod_logio.c to use %I and %O
|
198
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
199
|
+
</IfModule>
|
200
|
+
|
201
|
+
#
|
202
|
+
# The location and format of the access logfile (Common Logfile Format).
|
203
|
+
# If you do not define any access logfiles within a <VirtualHost>
|
204
|
+
# container, they will be logged here. Contrariwise, if you *do*
|
205
|
+
# define per-<VirtualHost> access logfiles, transactions will be
|
206
|
+
# logged therein and *not* in this file.
|
207
|
+
#
|
208
|
+
#CustomLog "logs/access_log" common
|
209
|
+
|
210
|
+
#
|
211
|
+
# If you prefer a logfile with access, agent, and referer information
|
212
|
+
# (Combined Logfile Format) you can use the following directive.
|
213
|
+
#
|
214
|
+
CustomLog "logs/access_log" combined
|
215
|
+
</IfModule>
|
216
|
+
|
217
|
+
<IfModule alias_module>
|
218
|
+
#
|
219
|
+
# Redirect: Allows you to tell clients about documents that used to
|
220
|
+
# exist in your server's namespace, but do not anymore. The client
|
221
|
+
# will make a new request for the document at its new location.
|
222
|
+
# Example:
|
223
|
+
# Redirect permanent /foo http://www.example.com/bar
|
224
|
+
|
225
|
+
#
|
226
|
+
# Alias: Maps web paths into filesystem paths and is used to
|
227
|
+
# access content that does not live under the DocumentRoot.
|
228
|
+
# Example:
|
229
|
+
# Alias /webpath /full/filesystem/path
|
230
|
+
#
|
231
|
+
# If you include a trailing / on /webpath then the server will
|
232
|
+
# require it to be present in the URL. You will also likely
|
233
|
+
# need to provide a <Directory> section to allow access to
|
234
|
+
# the filesystem path.
|
235
|
+
|
236
|
+
中略
|
237
|
+
|
238
|
+
#
|
239
|
+
<Directory "/var/www/cgi-bin">
|
240
|
+
AllowOverride None
|
241
|
+
Options None
|
242
|
+
Require all granted
|
243
|
+
</Directory>
|
244
|
+
|
245
|
+
<IfModule mime_module>
|
246
|
+
#
|
247
|
+
# TypesConfig points to the file containing the list of mappings from
|
248
|
+
# filename extension to MIME-type.
|
249
|
+
#
|
250
|
+
TypesConfig /etc/mime.types
|
251
|
+
|
252
|
+
#
|
253
|
+
# AddType allows you to add to or override the MIME configuration
|
254
|
+
# file specified in TypesConfig for specific file types.
|
255
|
+
#
|
256
|
+
#AddType application/x-gzip .tgz
|
257
|
+
#
|
258
|
+
# AddEncoding allows you to have certain browsers uncompress
|
259
|
+
# information on the fly. Note: Not all browsers support this.
|
260
|
+
#
|
261
|
+
#AddEncoding x-compress .Z
|
262
|
+
#AddEncoding x-gzip .gz .tgz
|
263
|
+
#
|
264
|
+
# If the AddEncoding directives above are commented-out, then you
|
265
|
+
# probably should define those extensions to indicate media types:
|
266
|
+
#
|
267
|
+
AddType application/x-compress .Z
|
268
|
+
AddType application/x-gzip .gz .tgz
|
269
|
+
|
270
|
+
中略
|
271
|
+
|
272
|
+
# in HTML content to override this choice, comment out this
|
273
|
+
# directive:
|
274
|
+
#
|
275
|
+
AddDefaultCharset UTF-8
|
276
|
+
|
277
|
+
<IfModule mime_magic_module>
|
278
|
+
#
|
279
|
+
# The mod_mime_magic module allows the server to use various hints from the
|
280
|
+
# contents of the file itself to determine its type. The MIMEMagicFile
|
281
|
+
# directive tells the module where the hint definitions are located.
|
282
|
+
#
|
283
|
+
MIMEMagicFile conf/magic
|
284
|
+
</IfModule>
|
285
|
+
|
286
|
+
中略
|
287
|
+
|
288
|
+
EnableSendfile on
|
289
|
+
|
290
|
+
# Supplemental configuration
|
291
|
+
#
|
292
|
+
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
293
|
+
IncludeOptional conf.d/*.conf
|
294
|
+
```
|
295
|
+
|
296
|
+
|
27
297
|
以上ご教示いただければありがたいです。
|
2
httpd\.confファイルのコードを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,4 +18,10 @@
|
|
18
18
|
|
19
19
|
になります。
|
20
20
|
|
21
|
+
追記:
|
22
|
+
現在のhttpd.confのコードです。
|
23
|
+
↓↓↓↓↓↓↓
|
24
|
+
https://www.evernote.com/shard/s25/sh/82a7a0ab-9ad9-4691-937d-db2ac16c30cf/9b849b940eaf2840d403a8bf3d4d8f8d
|
25
|
+
|
26
|
+
|
21
27
|
以上ご教示いただければありがたいです。
|
1
誤字修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
掲題の件でご質問です。
|
2
2
|
|
3
3
|
example.comというドメインを取得し、
|
4
|
-
www/html/hogehogeにWordPressを設置しました。
|
4
|
+
サーバーの"www/html/hogehoge"内にWordPressを設置しました。
|
5
5
|
|
6
6
|
しかし、WordPressのサイトにアクセスするには
|
7
7
|
example.com/hogehogeとしないとアクセスできません。
|
8
8
|
|
9
9
|
設定したいこととしては
|
10
10
|
example.comで
|
11
|
-
WordPressにアクセスできるように設定したいです。
|
11
|
+
WordPressのサイトにアクセスできるように設定したいです。
|
12
12
|
|
13
13
|
ついてはどのようにDocumentRootを設定すればいいでしょうか?
|
14
|
+
DNSは設定済みです。
|
14
15
|
|
15
16
|
■サーバー:さくらVPS
|
16
17
|
■ os:centos7
|