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

質問編集履歴

4

修正

2019/10/17 02:43

投稿

aae_11
aae_11

スコア178

title CHANGED
File without changes
body CHANGED
@@ -19,7 +19,7 @@
19
19
  <RequireAny>
20
20
  Require ip 127.0.0.1
21
21
  Require ip ::1
22
- Require ip 192.168.33.10/24
22
+ Require ip ::192.168.33.10/24
23
23
  </RequireAny>
24
24
  </IfModule>
25
25
  <IfModule !mod_authz_core.c>

3

追記、修正

2019/10/17 02:43

投稿

aae_11
aae_11

スコア178

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,7 @@
1
1
  CentOS7にてインストールしたphpmyadminへのアクセスに失敗してしまいます。
2
2
  以下は、```vi /etc/httpd/conf.d/phpMyAdmin.conf```として、表示した設定ファイルの中身となります。
3
3
  ```
4
- # phpMyAdmin - Web based MySQL browser written in php
4
+ phpMyAdmin - Web based MySQL browser written in php
5
5
  #
6
6
  # Allows only localhost by default
7
7
  #
@@ -19,63 +19,13 @@
19
19
  <RequireAny>
20
20
  Require ip 127.0.0.1
21
21
  Require ip ::1
22
- Require ip 192.***.**.**/24
22
+ Require ip 192.168.33.10/24
23
23
  </RequireAny>
24
24
  </IfModule>
25
25
  <IfModule !mod_authz_core.c>
26
26
  # Apache 2.2
27
27
  Order Deny,Allow
28
- -- INSERT --
29
- # Apache 2.2
30
- Order Deny,Allow
31
- Deny from All
32
- Allow from 127.0.0.1
33
- Allow from ::1
34
- Allow from::192.***.**.**/24
35
- </IfModule>
36
- </Directory>
37
-
38
- <Directory /usr/share/phpMyAdmin/setup/>
39
- <IfModule mod_authz_core.c>
40
- # Apache 2.4
41
- <RequireAny>
42
- Require ip 127.0.0.1
43
- Require ip ::1
44
-     Require ip::192.***.**.**/24
45
- </RequireAny>
46
- </IfModule>
47
- <IfModule !mod_authz_core.c>
48
- # Apache 2.2
49
- Order Deny,Allow
50
- Deny from All
51
- Allow from 127.0.0.1
52
- Allow from ::1
53
- -- INSERT --
54
- Allow from 127.0.0.1
55
- Allow from ::1
56
- Allow from::192.***.**.**/24
57
- </IfModule>
58
- </Directory>
59
-
60
- # These directories do not require access over HTTP - taken from the original
61
- # phpMyAdmin upstream tarball
62
- #
63
- <Directory /usr/share/phpMyAdmin/libraries/>
64
- Order Deny,Allow
65
- Deny from All
66
- Allow from None
67
- </Directory>
68
-
69
- <Directory /usr/share/phpMyAdmin/setup/lib/>
28
+ "/etc/httpd/conf.d/phpMyAdmin.conf" [readonly] 79L, 1921C
70
- Order Deny,Allow
71
- Deny from All
72
- Allow from None
73
- </Directory>
74
-
75
- <Directory /usr/share/phpMyAdmin/setup/frames/>
76
- Order Deny,Allow
77
- Deny from All
78
- -- INSERT --
79
29
  ```
80
30
  こちらの設定のまま、```systemctl reload httpd```を実行しますと、
81
31
  > Failed to reload httpd\xe3\x80\x80.service: Unit not found.
@@ -91,4 +41,26 @@
91
41
  You don't have permission to access /phpmyadmin/ on this server.
92
42
 
93
43
  と出てしまった為、設定ファイルを書き換えたのですが、それがまずかったのでしょうか...?
94
- phpmyadminへのアクセスが出来ない状況な為、ご助言いただけましたら幸いです。
44
+ phpmyadminへのアクセスが出来ない状況な為、ご助言いただけましたら幸いです。
45
+
46
+ ### 追記
47
+
48
+ 以下は```apachectl configtest ```を実行した結果です
49
+ > AH00526: Syntax error on line 38 of /etc/httpd/conf.d/phpMyAdmin.conf:
50
+ Invalid command '\xe3\x80\x80\xe3\x80\x80\xe3\x80\x80', perhaps misspelled or defined by a module not included in the server configuration
51
+
52
+ 以下は```systemctl status httpd.service```とした時の結果です。
53
+ > httpd.service - The Apache HTTP Server
54
+ Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
55
+ Active: failed (Result: exit-code) since 日 2019-10-13 09:17:28 UTC; 2h 22min ago
56
+ Docs: man:httpd(8)
57
+ man:apachectl(8)
58
+ Process: 23945 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
59
+ Process: 23866 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
60
+ Process: 23944 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
61
+
62
+ 以下は```journalctl -xe```を実行した結果です
63
+ > Hint: You are currently not seeing messages from other users and the system.
64
+ Users in the 'systemd-journal' group can see all messages. Pass -q to
65
+ turn off this notice.
66
+ No journal files were opened due to insufficient permissions.

2

修正

2019/10/16 09:57

投稿

aae_11
aae_11

スコア178

title CHANGED
File without changes
body CHANGED
@@ -86,7 +86,7 @@
86
86
  rror code. See "systemctl status httpd.service" and "journalctl -xe" for details.
87
87
 
88
88
  との表示が出力されます。
89
- phpmyadminの設定はhttp://ipアドレス/phpmyadmin/しますと、
89
+ phpmyadminアクセスの為、http://ipアドレス/phpmyadmin/へアクセスしますと、
90
90
  > Forbidden
91
91
  You don't have permission to access /phpmyadmin/ on this server.
92
92
 

1

修正

2019/10/16 07:53

投稿

aae_11
aae_11

スコア178

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,4 @@
1
- CentOS7にてphpmyadminの設定に失敗してしまいます。
1
+ CentOS7にてインストールしたphpmyadminアクセスに失敗してしまいます。
2
2
  以下は、```vi /etc/httpd/conf.d/phpMyAdmin.conf```として、表示した設定ファイルの中身となります。
3
3
  ```
4
4
  # phpMyAdmin - Web based MySQL browser written in php