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

質問編集履歴

8

apache2.conf更新

2021/05/09 06:58

投稿

s__k
s__k

スコア1

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
- - DocumentRoot /root/mysite/mysite
44
+ DocumentRoot /root/mysite/mysite
44
- - <Directory /root/mysite/mysite>
45
+ <Directory /root/mysite/mysite>
45
- - Options Indexes FollowSymLinks
46
+ Options Indexes FollowSymLinks
46
- - AllowOverride None
47
+ AllowOverride None
47
- - Require all granted
48
+ Require all granted
48
- - </Directory>
49
+ </Directory>
49
- -
50
+
50
- - ScriptAlias /scripts/ /root/mysite/scripts
51
+ ScriptAlias /scripts/ /root/mysite/scripts
51
- - <Directory /root/mysite/scripts>
52
+ <Directory /root/mysite/scripts>
52
- - AddHandler cgi-script .cgi .py
53
+ AddHandler cgi-script .cgi .py
53
- - AllowOverride None
54
+ AllowOverride None
54
- - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
55
+ Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
55
- - Require all granted
56
+ Require all granted
56
- - </Directory>
57
+ </Directory>
58
+ ```
57
59
 
58
60
  上記の様に編集しています
59
61
  ちなみに/etc/apache2/site-enabled/000-default.confの

7

dockerfile 修正

2021/05/09 06:58

投稿

s__k
s__k

スコア1

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

マークダウン記法追加

2021/05/09 06:56

投稿

s__k
s__k

スコア1

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
- に変更したいのですが、ブラウザにForbidden:You don't have permission to access this resource.のメッセージが出てアクセスができません。
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
- apacheのエラーログにはAH01630: client denied by server configurationと記述されています。
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ディレクトリ構造を更新

2021/05/09 03:24

投稿

s__k
s__k

スコア1

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
- ────└──[-rw-r--r--] index.html
22
+ ──└──[-rw-r--r--] index.html
23
23
 
24
24
  test.pyの内部は
25
25
  ```python

4

mysiteディレクトリ構造を更新

2021/05/09 03:17

投稿

s__k
s__k

スコア1

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
- └── mysite
18
+ ./mysite
19
+ ├── [drwxr-xr-x] scripts
20
+ │   └── [-rwxr-xr-x] test.py
21
+ └── [drwxr-xr-x] mysite
22
- ── index.html
22
+ ────└──[-rw-r--r--] index.html
23
23
 
24
24
  test.pyの内部は
25
25
  ```python

3

mysiteディレクトリ構造を更新

2021/05/09 03:16

投稿

s__k
s__k

スコア1

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
18
+ mysite
19
- ├── scripts
19
+ ├── scripts
20
-   └── test.py
20
+    └── test.py
21
- └── mysite
21
+ └── mysite
22
- ── index.html
22
+ ── index.html
23
23
 
24
24
  test.pyの内部は
25
25
  ```python

2

mysiteディレクトリ構造を更新

2021/05/09 03:11

投稿

s__k
s__k

スコア1

title CHANGED
File without changes
body CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  /── mysite
19
19
  ├── scripts
20
-    └── test.py
20
+   └── test.py
21
21
  └── mysite
22
22
  └── index.html
23
23
 

1

mysiteディレクトリ構造を更新

2021/05/09 03:09

投稿

s__k
s__k

スコア1

title CHANGED
File without changes
body CHANGED
@@ -19,7 +19,7 @@
19
19
  ├── scripts
20
20
  │   └── test.py
21
21
  └── mysite
22
- ── index.html
22
+ ── index.html
23
23
 
24
24
  test.pyの内部は
25
25
  ```python