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

回答編集履歴

2

動作確認済み

2016/12/05 09:12

投稿

退会済みユーザー
answer CHANGED
@@ -1,17 +1,34 @@
1
+ こちらで動作するのを確認しました。
1
- こんな感じかしら?
2
+ default.conf
2
3
  ```ここに言語を入力
3
4
  server {
4
- # ~ 中略 ~
5
- location /phpMyAdmin {
6
- alias /usr/share/phpMyAdmin;
7
- index index.php;
5
+ listen 80;
8
- }
6
+ server_name localhost;
9
7
 
8
+ location /phpMyAdmin {
9
+ alias /usr/share/phpMyAdmin/;
10
+ index index.php;
11
+ }
12
+
10
- location ~ ^/phpMyAdmin.+\.php$ {
13
+ location ~ ^/phpMyAdmin/.+\.php$ {
11
- fastcgi_pass 127.0.0.1:9000;
14
+ fastcgi_pass 127.0.0.1:9000;
12
- fastcgi_index index.php;
15
+ fastcgi_index index.php;
13
- fastcgi_split_path_info ^/phpMyAdmin(.+\.php)(.*)$;
16
+ fastcgi_split_path_info ^/phpMyAdmin(.+\.php)(.*)$;
14
- fastcgi_param SCRIPT_FILENAME /usr/share/phpMyAdmin$fastcgi_script_name;
17
+ fastcgi_param SCRIPT_FILENAME /usr/share/phpMyAdmin$fastcgi_script_name;
15
- include fastcgi_params;
18
+ include fastcgi_params;
16
- }
19
+ }
20
+
21
+ location / {
22
+ root /usr/share/nginx/html;
23
+ index index.php index.html index.htm;
24
+ }
25
+
26
+ location ~ \.php$ {
27
+ root /usr/share/nginx/html;
28
+ fastcgi_pass 127.0.0.1:9000;
29
+ fastcgi_index index.php;
30
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
31
+ include fastcgi_params;
32
+ }
33
+ }
17
34
  ```

1

phpmyadminからphpMyAdminへ

2016/12/05 09:12

投稿

退会済みユーザー
answer CHANGED
@@ -2,15 +2,15 @@
2
2
  ```ここに言語を入力
3
3
  server {
4
4
  # ~ 中略 ~
5
- location /phpmyadmin {
5
+ location /phpMyAdmin {
6
6
  alias /usr/share/phpMyAdmin;
7
7
  index index.php;
8
8
  }
9
9
 
10
- location ~ ^/phpmyadmin.+\.php$ {
10
+ location ~ ^/phpMyAdmin.+\.php$ {
11
11
  fastcgi_pass 127.0.0.1:9000;
12
12
  fastcgi_index index.php;
13
- fastcgi_split_path_info ^/phpmyadmin(.+\.php)(.*)$;
13
+ fastcgi_split_path_info ^/phpMyAdmin(.+\.php)(.*)$;
14
14
  fastcgi_param SCRIPT_FILENAME /usr/share/phpMyAdmin$fastcgi_script_name;
15
15
  include fastcgi_params;
16
16
  }