質問編集履歴
8
apache2.conf更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -40,20 +40,22 @@
|
|
40
40
|
|
41
41
|
設定ファイルの/etc/apache2/apache2.confは # a2enmod cgid 実行後に
|
42
42
|
|
43
|
+
```apache2.conf
|
43
|
-
|
44
|
+
DocumentRoot /root/mysite/mysite
|
44
|
-
|
45
|
+
<Directory /root/mysite/mysite>
|
45
|
-
|
46
|
+
Options Indexes FollowSymLinks
|
46
|
-
|
47
|
+
AllowOverride None
|
47
|
-
|
48
|
+
Require all granted
|
48
|
-
|
49
|
+
</Directory>
|
49
|
-
|
50
|
+
|
50
|
-
|
51
|
+
ScriptAlias /scripts/ /root/mysite/scripts
|
51
|
-
|
52
|
+
<Directory /root/mysite/scripts>
|
52
|
-
|
53
|
+
AddHandler cgi-script .cgi .py
|
53
|
-
|
54
|
+
AllowOverride None
|
54
|
-
|
55
|
+
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
55
|
-
|
56
|
+
Require all granted
|
56
|
-
|
57
|
+
</Directory>
|
58
|
+
```
|
57
59
|
|
58
60
|
上記の様に編集しています
|
59
61
|
ちなみに/etc/apache2/site-enabled/000-default.confの
|
7
dockerfile 修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -69,7 +69,7 @@
|
|
69
69
|
**127.0.0.1/scripts/test.py <- エラー**
|
70
70
|
|
71
71
|
補足情報(Dockerfile)
|
72
|
-
|
72
|
+
```Dockerfile
|
73
73
|
FROM ubuntu:latest
|
74
74
|
USER root
|
75
75
|
EXPOSE 80
|
@@ -82,5 +82,5 @@
|
|
82
82
|
RUN apt-get install -y \
|
83
83
|
python3.8 \
|
84
84
|
&& apt-get clean
|
85
|
-
|
85
|
+
```
|
86
86
|
何か設定の見落としなどがあればご教授よろしくお願いします。
|
6
マークダウン記法追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,7 +12,9 @@
|
|
12
12
|
- /root/mysite/mysite/index.html
|
13
13
|
- /root/mysite/scripts
|
14
14
|
|
15
|
+
に変更したいのですが、ブラウザに
|
15
|
-
|
16
|
+
**Forbidden:You don't have permission to access this resource.**
|
17
|
+
のメッセージが出てアクセスができません。
|
16
18
|
mysiteディレクトリの構造は
|
17
19
|
|
18
20
|
./mysite
|
@@ -58,7 +60,9 @@
|
|
58
60
|
DocumentRoot /var/www/html
|
59
61
|
はコメントアウトしています。
|
60
62
|
|
63
|
+
apacheのエラーログには
|
61
|
-
|
64
|
+
**AH01630: client denied by server configuration**
|
65
|
+
と記述されています。
|
62
66
|
apache2.confのデフォルトパスから変更を行わなければindex.html 、test.pyともに問題なく動いています。
|
63
67
|
|
64
68
|
**127.0.0.1/cgi-bin/test.py <- 動く**
|
5
mysiteディレクトリ構造を更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
├── [drwxr-xr-x] scripts
|
20
20
|
│ └── [-rwxr-xr-x] test.py
|
21
21
|
└── [drwxr-xr-x] mysite
|
22
|
-
──
|
22
|
+
──└──[-rw-r--r--] index.html
|
23
23
|
|
24
24
|
test.pyの内部は
|
25
25
|
```python
|
4
mysiteディレクトリ構造を更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,11 +15,11 @@
|
|
15
15
|
に変更したいのですが、ブラウザにForbidden:You don't have permission to access this resource.のメッセージが出てアクセスができません。
|
16
16
|
mysiteディレクトリの構造は
|
17
17
|
|
18
|
-
mysite
|
19
|
-
├── scripts
|
20
|
-
│ └── test.py
|
21
|
-
|
18
|
+
./mysite
|
19
|
+
├── [drwxr-xr-x] scripts
|
20
|
+
│ └── [-rwxr-xr-x] test.py
|
21
|
+
└── [drwxr-xr-x] mysite
|
22
|
-
|
22
|
+
────└──[-rw-r--r--] index.html
|
23
23
|
|
24
24
|
test.pyの内部は
|
25
25
|
```python
|
3
mysiteディレクトリ構造を更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,11 +15,11 @@
|
|
15
15
|
に変更したいのですが、ブラウザにForbidden:You don't have permission to access this resource.のメッセージが出てアクセスができません。
|
16
16
|
mysiteディレクトリの構造は
|
17
17
|
|
18
|
-
|
18
|
+
mysite
|
19
|
-
|
19
|
+
├── scripts
|
20
|
-
|
20
|
+
│ └── test.py
|
21
|
-
|
21
|
+
└── mysite
|
22
|
-
|
22
|
+
├── index.html
|
23
23
|
|
24
24
|
test.pyの内部は
|
25
25
|
```python
|
2
mysiteディレクトリ構造を更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
/── mysite
|
19
19
|
├── scripts
|
20
|
-
│
|
20
|
+
│ └── test.py
|
21
21
|
└── mysite
|
22
22
|
└── index.html
|
23
23
|
|
1
mysiteディレクトリ構造を更新
title
CHANGED
File without changes
|
body
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
├── scripts
|
20
20
|
│ └── test.py
|
21
21
|
└── mysite
|
22
|
-
|
22
|
+
└── index.html
|
23
23
|
|
24
24
|
test.pyの内部は
|
25
25
|
```python
|