質問編集履歴
2
wordpressとfuelの\.htaccessを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -138,6 +138,236 @@
|
|
138
138
|
|
139
139
|
|
140
140
|
|
141
|
+
```bash
|
142
|
+
|
143
|
+
# /home/kusanagi/www/DocumentRoot/.htaccess
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<Files ~ "^\.ht">
|
148
|
+
|
149
|
+
Deny from all
|
150
|
+
|
151
|
+
</Files>
|
152
|
+
|
153
|
+
<Files wp-login.php>
|
154
|
+
|
155
|
+
Order deny,allow
|
156
|
+
|
157
|
+
Deny from all
|
158
|
+
|
159
|
+
Allow from all
|
160
|
+
|
161
|
+
#Allow from 127.0.0.1
|
162
|
+
|
163
|
+
AuthType Basic
|
164
|
+
|
165
|
+
AuthName "ENTER YOUR NAME & PASSWORD TO LOGIN"
|
166
|
+
|
167
|
+
AuthUserFile /home/kusanagi/.htpasswd
|
168
|
+
|
169
|
+
Require valid-user
|
170
|
+
|
171
|
+
Satisfy any
|
172
|
+
|
173
|
+
</Files>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<IfModule mod_rewrite.c>
|
178
|
+
|
179
|
+
RewriteEngine On
|
180
|
+
|
181
|
+
RewriteBase /
|
182
|
+
|
183
|
+
RewriteRule ^index\.php$ - [L]
|
184
|
+
|
185
|
+
RewriteCond %{REQUEST_URI} !\.(gif|css|js|swf|jpeg|jpg|jpe|png|ico|swd|pdf|svg|eot|ttf|woff) $
|
186
|
+
|
187
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
188
|
+
|
189
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
190
|
+
|
191
|
+
RewriteRule . /index.php [L]
|
192
|
+
|
193
|
+
</IfModule>
|
194
|
+
|
195
|
+
```
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
```bash
|
200
|
+
|
201
|
+
# /home/kusanagi/www/admin/public/.htaccess
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
# Multiple Environment config, set this to development, staging or production
|
206
|
+
|
207
|
+
SetEnv FUEL_ENV development
|
208
|
+
|
209
|
+
# SetEnv FUEL_ENV production
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<IfModule mod_rewrite.c>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
# RewriteEngine を起動
|
218
|
+
|
219
|
+
RewriteEngine on
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
# NOTICE: If you get a 404 play with combinations of the following commented out lines
|
224
|
+
|
225
|
+
#AllowOverride All
|
226
|
+
|
227
|
+
#RewriteBase /wherever/fuel/is
|
228
|
+
|
229
|
+
RewriteBase /admin
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
# Make sure directory listing is disabled
|
234
|
+
|
235
|
+
# Options +FollowSymLinks -Indexes
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
# Restrict your site to only one domain
|
240
|
+
|
241
|
+
# !important USE ONLY ONE OPTION
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
# Option 1: To rewrite "www.domain.com -> domain.com" uncomment the following lines.
|
246
|
+
|
247
|
+
#RewriteCond %{HTTPS} !=on
|
248
|
+
|
249
|
+
#RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
250
|
+
|
251
|
+
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
# Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines.
|
256
|
+
|
257
|
+
#RewriteCond %{HTTPS} !=on
|
258
|
+
|
259
|
+
#RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
|
260
|
+
|
261
|
+
#RewriteCond %{HTTP_HOST} (.+)$ [NC]
|
262
|
+
|
263
|
+
#RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
# Remove index.php from URL
|
268
|
+
|
269
|
+
RewriteCond %{HTTP:X-Requested-With} !^XMLHttpRequest$
|
270
|
+
|
271
|
+
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
|
272
|
+
|
273
|
+
RewriteRule ^index\.php(.*)$ $1 [R=301,NS,L]
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
DirectorySlash Off
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
RedirectMatch permanent /admin$ /admin/login
|
282
|
+
|
283
|
+
RedirectMatch permanent /admin/$ /admin/login
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
# make HTTP Basic Authentication work on php-fcgi installs
|
288
|
+
|
289
|
+
<IfModule mod_fcgid.c>
|
290
|
+
|
291
|
+
RewriteCond %{HTTP:Authorization} .
|
292
|
+
|
293
|
+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
294
|
+
|
295
|
+
</IfModule>
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
# Send request via index.php if not a real file or directory
|
300
|
+
|
301
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
302
|
+
|
303
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
# deal with php-fcgi first
|
308
|
+
|
309
|
+
<IfModule mod_fcgid.c>
|
310
|
+
|
311
|
+
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
|
312
|
+
|
313
|
+
</IfModule>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
# no php-fcgi, check for sapi and fpm
|
318
|
+
|
319
|
+
<IfModule !mod_fcgid.c>
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
# for PHP5 sapi installations
|
324
|
+
|
325
|
+
<IfModule mod_php5.c>
|
326
|
+
|
327
|
+
RewriteRule ^(.*)$ index.php/$1 [L]
|
328
|
+
|
329
|
+
</IfModule>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
<IfModule !mod_php5.c>
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
# for PHP7 sapi installations
|
338
|
+
|
339
|
+
<IfModule mod_php7.c>
|
340
|
+
|
341
|
+
RewriteRule ^(.*)$ index.php/$1 [L]
|
342
|
+
|
343
|
+
</IfModule>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
# for fpm installations
|
348
|
+
|
349
|
+
<IfModule !mod_php7.c>
|
350
|
+
|
351
|
+
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
|
352
|
+
|
353
|
+
</IfModule>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</IfModule>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</IfModule>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
</IfModule>
|
366
|
+
|
367
|
+
```
|
368
|
+
|
369
|
+
|
370
|
+
|
141
371
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
142
372
|
|
143
373
|
| |バージョン|
|
1
タイトルと実現したいことを更新
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
KUSANAGI で Nginx + WordPress + FuelPHP
|
1
|
+
KUSANAGI for ConoHa で Nginx + WordPress + FuelPHP を正常に動作させる
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
###前提・実現したいこと
|
6
6
|
|
7
|
-
KUSANAGI for ConoHa にて、Nginx で WordPress と FuelPHP を動かしたいです。
|
7
|
+
KUSANAGI for ConoHa にて、Nginx で WordPress と FuelPHP を以下のURLで動かしたいです。
|
8
8
|
|
9
9
|
| |URL|
|
10
10
|
|
@@ -13,6 +13,10 @@
|
|
13
13
|
|WordPress|http://example.jp|
|
14
14
|
|
15
15
|
|FuelPHP|http://example.jp/admin/{コントローラ名}|
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
* 通常/adminとするとwp-adminに飛ぶと思うのですが、そうせずFuelPHP側が表示されるように
|
16
20
|
|
17
21
|
|
18
22
|
|