質問編集履歴
3
/etc/ngnix/sites-available/defaultの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -19,3 +19,191 @@
|
|
19
19
|
ufw reload
|
20
20
|
|
21
21
|
```
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
```/etc/ngnix/sites-available/default
|
26
|
+
|
27
|
+
##
|
28
|
+
|
29
|
+
# You should look at the following URL's in order to grasp a solid understanding
|
30
|
+
|
31
|
+
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
32
|
+
|
33
|
+
# https://www.nginx.com/resources/wiki/start/
|
34
|
+
|
35
|
+
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
|
36
|
+
|
37
|
+
# https://wiki.debian.org/Nginx/DirectoryStructure
|
38
|
+
|
39
|
+
#
|
40
|
+
|
41
|
+
# In most cases, administrators will remove this file from sites-enabled/ and
|
42
|
+
|
43
|
+
# leave it as reference inside of sites-available where it will continue to be
|
44
|
+
|
45
|
+
# updated by the nginx packaging team.
|
46
|
+
|
47
|
+
#
|
48
|
+
|
49
|
+
# This file will automatically load configuration files provided by other
|
50
|
+
|
51
|
+
# applications, such as Drupal or Wordpress. These applications will be made
|
52
|
+
|
53
|
+
# available underneath a path with that package name, such as /drupal8.
|
54
|
+
|
55
|
+
#
|
56
|
+
|
57
|
+
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
58
|
+
|
59
|
+
##
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
# Default server configuration
|
64
|
+
|
65
|
+
#
|
66
|
+
|
67
|
+
server {
|
68
|
+
|
69
|
+
listen 80 default_server;
|
70
|
+
|
71
|
+
listen [::]:80 default_server;
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
# SSL configuration
|
76
|
+
|
77
|
+
#
|
78
|
+
|
79
|
+
# listen 443 ssl default_server;
|
80
|
+
|
81
|
+
# listen [::]:443 ssl default_server;
|
82
|
+
|
83
|
+
#
|
84
|
+
|
85
|
+
# Note: You should disable gzip for SSL traffic.
|
86
|
+
|
87
|
+
# See: https://bugs.debian.org/773332
|
88
|
+
|
89
|
+
#
|
90
|
+
|
91
|
+
# Read up on ssl_ciphers to ensure a secure configuration.
|
92
|
+
|
93
|
+
# See: https://bugs.debian.org/765782
|
94
|
+
|
95
|
+
#
|
96
|
+
|
97
|
+
# Self signed certs generated by the ssl-cert package
|
98
|
+
|
99
|
+
# Don't use them in a production server!
|
100
|
+
|
101
|
+
#
|
102
|
+
|
103
|
+
# include snippets/snakeoil.conf;
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
root /var/www/html;
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
# Add index.php to the list if you are using PHP
|
112
|
+
|
113
|
+
index index.html index.htm index.nginx-debian.html;
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
server_name _;
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
location / {
|
122
|
+
|
123
|
+
# First attempt to serve request as file, then
|
124
|
+
|
125
|
+
# as directory, then fall back to displaying a 404.
|
126
|
+
|
127
|
+
try_files $uri $uri/ =404;
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
# pass PHP scripts to FastCGI server
|
134
|
+
|
135
|
+
#
|
136
|
+
|
137
|
+
#location ~ .php$ {
|
138
|
+
|
139
|
+
# include snippets/fastcgi-php.conf;
|
140
|
+
|
141
|
+
#
|
142
|
+
|
143
|
+
# # With php-fpm (or other unix sockets):
|
144
|
+
|
145
|
+
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
|
146
|
+
|
147
|
+
# # With php-cgi (or other tcp sockets):
|
148
|
+
|
149
|
+
# fastcgi_pass 127.0.0.1:9000;
|
150
|
+
|
151
|
+
#}
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
# deny access to .htaccess files, if Apache's document root
|
156
|
+
|
157
|
+
# concurs with nginx's one
|
158
|
+
|
159
|
+
#
|
160
|
+
|
161
|
+
#location ~ /.ht {
|
162
|
+
|
163
|
+
# deny all;
|
164
|
+
|
165
|
+
#}
|
166
|
+
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
# Virtual Host configuration for example.com
|
174
|
+
|
175
|
+
#
|
176
|
+
|
177
|
+
# You can move that to a different file under sites-available/ and symlink that
|
178
|
+
|
179
|
+
# to sites-enabled/ to enable it.
|
180
|
+
|
181
|
+
#
|
182
|
+
|
183
|
+
#server {
|
184
|
+
|
185
|
+
# listen 80;
|
186
|
+
|
187
|
+
# listen [::]:80;
|
188
|
+
|
189
|
+
#
|
190
|
+
|
191
|
+
# server_name example.com;
|
192
|
+
|
193
|
+
#
|
194
|
+
|
195
|
+
# root /var/www/example.com;
|
196
|
+
|
197
|
+
# index index.html;
|
198
|
+
|
199
|
+
#
|
200
|
+
|
201
|
+
# location / {
|
202
|
+
|
203
|
+
# try_files $uri $uri/ =404;
|
204
|
+
|
205
|
+
# }
|
206
|
+
|
207
|
+
#}
|
208
|
+
|
209
|
+
```
|
2
文の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,8 +16,6 @@
|
|
16
16
|
|
17
17
|
ufw allow 'Nginx Full'
|
18
18
|
|
19
|
-
ufw allow 'Nginx Full'
|
20
|
-
|
21
19
|
ufw reload
|
22
20
|
|
23
21
|
```
|
1
ufw reload の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,4 +18,6 @@
|
|
18
18
|
|
19
19
|
ufw allow 'Nginx Full'
|
20
20
|
|
21
|
+
ufw reload
|
22
|
+
|
21
23
|
```
|