質問編集履歴
6
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -116,4 +116,6 @@
|
|
116
116
|
# }
|
117
117
|
#}
|
118
118
|
|
119
|
-
```
|
119
|
+
```
|
120
|
+
追記
|
121
|
+
絶対URLで入力しましたがエラーは変わりませんでした。
|
5
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,4 +18,102 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
初心者でお手数ですが、よろしくお願いします。
|
21
|
+
初心者でお手数ですが、よろしくお願いします。
|
22
|
+
|
23
|
+
追記
|
24
|
+
http://b.fcsys.org/2015/07/enable-customization-index-page-for-nginx.html
|
25
|
+
こちらのサイトを参考にしてみたのですが、 https://imgur.com/a/5jAjBEw 404 Not Foundと表示されてしまいます。ファイルはしっかりセットしてあります。 https://imgur.com/a/OdoSUUL
|
26
|
+
```config
|
27
|
+
##
|
28
|
+
# You should look at the following URL's in order to grasp a solid understanding
|
29
|
+
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
30
|
+
# http://wiki.nginx.org/Pitfalls
|
31
|
+
# http://wiki.nginx.org/QuickStart
|
32
|
+
# http://wiki.nginx.org/Configuration
|
33
|
+
#
|
34
|
+
# Generally, you will want to move this file somewhere, and start with a clean
|
35
|
+
# file but keep this around for reference. Or just disable in sites-enabled.
|
36
|
+
#
|
37
|
+
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
38
|
+
##
|
39
|
+
|
40
|
+
# Default server configuration
|
41
|
+
#
|
42
|
+
server {
|
43
|
+
listen 80 default_server;
|
44
|
+
listen [::]:80 default_server;
|
45
|
+
|
46
|
+
# SSL configuration
|
47
|
+
#
|
48
|
+
# listen 443 ssl default_server;
|
49
|
+
# listen [::]:443 ssl default_server;
|
50
|
+
#
|
51
|
+
# Note: You should disable gzip for SSL traffic.
|
52
|
+
# See: https://bugs.debian.org/773332
|
53
|
+
#
|
54
|
+
# Read up on ssl_ciphers to ensure a secure configuration.
|
55
|
+
# See: https://bugs.debian.org/765782
|
56
|
+
#
|
57
|
+
# Self signed certs generated by the ssl-cert package
|
58
|
+
# Don't use them in a production server!
|
59
|
+
#
|
60
|
+
# include snippets/snakeoil.conf;
|
61
|
+
|
62
|
+
root /var/www/html;
|
63
|
+
|
64
|
+
# Add index.php to the list if you are using PHP
|
65
|
+
index index.html index.htm index.nginx-debian.html;
|
66
|
+
|
67
|
+
server_name _;
|
68
|
+
|
69
|
+
location / {
|
70
|
+
# First attempt to serve request as file, then
|
71
|
+
# as directory, then fall back to displaying a 404.
|
72
|
+
try_files $uri $uri/ =404;
|
73
|
+
fancyindex on; # Enable FuncyIndex
|
74
|
+
fancyindex_exact_size off; # off: Use GB / MB / KB etc.
|
75
|
+
fancyindex_localtime on; # on: Use server local time
|
76
|
+
fancyindex_header /etc/nginx/header.html; # Customization Header Code
|
77
|
+
fancyindex_footer /etc/nginx/footer.html; # Customization Footer Code
|
78
|
+
}
|
79
|
+
|
80
|
+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
81
|
+
#
|
82
|
+
#location ~ .php$ {
|
83
|
+
# include snippets/fastcgi-php.conf;
|
84
|
+
#
|
85
|
+
# # With php7.0-cgi alone:
|
86
|
+
# fastcgi_pass 127.0.0.1:9000;
|
87
|
+
# # With php7.0-fpm:
|
88
|
+
# fastcgi_pass unix:/run/php/php7.0-fpm.sock;
|
89
|
+
#}
|
90
|
+
|
91
|
+
# deny access to .htaccess files, if Apache's document root
|
92
|
+
# concurs with nginx's one
|
93
|
+
#
|
94
|
+
#location ~ /.ht {
|
95
|
+
# deny all;
|
96
|
+
#}
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
# Virtual Host configuration for example.com
|
101
|
+
#
|
102
|
+
# You can move that to a different file under sites-available/ and symlink that
|
103
|
+
# to sites-enabled/ to enable it.
|
104
|
+
#
|
105
|
+
#server {
|
106
|
+
# listen 80;
|
107
|
+
# listen [::]:80;
|
108
|
+
#
|
109
|
+
# server_name example.com;
|
110
|
+
#
|
111
|
+
# root /var/www/example.com;
|
112
|
+
# index index.html;
|
113
|
+
#
|
114
|
+
# location / {
|
115
|
+
# try_files $uri $uri/ =404;
|
116
|
+
# }
|
117
|
+
#}
|
118
|
+
|
119
|
+
```
|
4
文法の編集
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
nginxでDirectoryIndexみたいのをhtml上で表示したい。
|
1
|
+
nginxでDirectoryIndexみたいのをhtml上で表示したい。
|
body
CHANGED
File without changes
|
3
文法の編集
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
nginxで
|
1
|
+
nginxでDirectoryIndexみたいのをhtml上で表示したい。 このように実装したいと思っています。
|
body
CHANGED
File without changes
|
2
説明が不十分だったため
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
nginxでDirectoryIndexをhtml上で表示したい。
|
3
|
+
nginxでDirectoryIndexみたいのをhtml上で表示したい。
|
4
4
|
このように実装したいと思っています。
|
5
5
|
```html
|
6
6
|
|
1
説明が不十分だったため
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,21 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
nginxで
|
3
|
+
nginxでDirectoryIndexをhtml上で表示したい。
|
4
|
+
このように実装したいと思っています。
|
5
|
+
```html
|
4
6
|
|
7
|
+
<html>
|
8
|
+
<head>
|
9
|
+
<title>TESTPAGE</title>
|
10
|
+
</head>
|
5
11
|
|
12
|
+
<br>TEST<br/>
|
13
|
+
[index.htmlがあるフォルダーのディレクトリを表示(選択してそのファイルを直リンクで開く)]
|
6
14
|
|
15
|
+
</body>
|
16
|
+
</html>
|
17
|
+
```
|
18
|
+
|
19
|
+
|
20
|
+
|
7
|
-
お手数ですが、よろしくお願いします。
|
21
|
+
初心者でお手数ですが、よろしくお願いします。
|