|
1 | 1 | server
|
2 | 2 | {
|
3 |
| - listen 8002; |
| 3 | + listen 80; |
4 | 4 |
|
5 | 5 | host 127.0.0.1;
|
6 | 6 | client_max_body_size 100;
|
@@ -60,67 +60,68 @@ server
|
60 | 60 | autoindex on;
|
61 | 61 | }
|
62 | 62 | }
|
63 |
| -# server |
64 |
| -# { |
65 |
| -# listen 8002; |
66 | 63 |
|
67 |
| -# host 127.0.0.1; |
68 |
| -# client_max_body_size 10000000; |
69 |
| -# root ./www/html; |
70 |
| -# server_name localhostp; |
71 |
| -# error_page 404 www/html/error_pages/404.html; |
72 |
| -# error_page 403 www/html/error_pages/403.html; |
73 |
| -# error_page 409 www/html/error_pages/409.html; |
74 |
| -# error_page 400 www/html/error_pages/400.html; |
75 |
| -# error_page 405 www/html/error_pages/405.html; |
76 |
| -# error_page 413 www/html/error_pages/413.html; |
77 |
| -# error_page 500 www/html/error_pages/500.html; |
| 64 | +server |
| 65 | + { |
| 66 | + listen 80; |
78 | 67 |
|
79 |
| -# index index.html; |
| 68 | + host 127.0.0.1; |
| 69 | + client_max_body_size 10000000; |
| 70 | + root ./www/html; |
| 71 | + server_name localhostp; |
| 72 | + error_page 404 www/html/error_pages/404.html; |
| 73 | + error_page 403 www/html/error_pages/403.html; |
| 74 | + error_page 409 www/html/error_pages/409.html; |
| 75 | + error_page 400 www/html/error_pages/400.html; |
| 76 | + error_page 405 www/html/error_pages/405.html; |
| 77 | + error_page 413 www/html/error_pages/413.html; |
| 78 | + error_page 500 www/html/error_pages/500.html; |
| 79 | + |
| 80 | + index index.html; |
80 | 81 |
|
81 |
| -# location / { |
82 |
| -# autoindex on; |
83 |
| -# } |
| 82 | + location / { |
| 83 | + autoindex on; |
| 84 | + } |
84 | 85 |
|
85 |
| -# location /cgi_bin |
86 |
| -# { |
| 86 | + location /cgi_bin |
| 87 | + { |
87 | 88 |
|
88 |
| -# root ./www/html; |
89 |
| -# allow_Methods GET POST; |
90 |
| -# index hello.html; |
91 |
| -# path_info .py /usr/bin/python3; |
92 |
| -# path_info .php /php-cgi; |
93 |
| -# #listen 8001; |
94 |
| -# #autoindex on; |
95 |
| -# } |
| 89 | + root ./www/html; |
| 90 | + allow_Methods GET POST; |
| 91 | + index hello.html; |
| 92 | + path_info .py /usr/bin/python3; |
| 93 | + path_info .php /php-cgi; |
| 94 | + #listen 8001; |
| 95 | + #autoindex on; |
| 96 | + } |
96 | 97 |
|
97 |
| -# location /red |
98 |
| -# { |
99 |
| -# return 301 https://www.youtube.com/watch?v=_Nbm2yn8WA8&t=30s; |
100 |
| -# } |
| 98 | + location /red |
| 99 | + { |
| 100 | + return 301 https://www.youtube.com/watch?v=_Nbm2yn8WA8&t=30s; |
| 101 | + } |
101 | 102 |
|
102 |
| -# location /delete { |
103 |
| -# root ./www/html/delete; |
104 |
| -# allow_methods DELETE; |
105 |
| -# index todelete; |
106 |
| -# path_info .py /usr/bin/python3; |
107 |
| -# } |
| 103 | + location /delete { |
| 104 | + root ./www/html/delete; |
| 105 | + allow_methods DELETE; |
| 106 | + index todelete; |
| 107 | + path_info .py /usr/bin/python3; |
| 108 | + } |
108 | 109 |
|
109 |
| -# location /upload{ |
110 |
| -# root ./www/html/upload; |
111 |
| -# index upload.html; |
112 |
| -# allow_methods POST GET; |
113 |
| -# upload on; |
114 |
| -# upload_store /upload; |
115 |
| -# } |
| 110 | + location /upload{ |
| 111 | + root ./www/html/upload; |
| 112 | + index upload.html; |
| 113 | + allow_methods POST GET; |
| 114 | + upload on; |
| 115 | + upload_store /upload; |
| 116 | + } |
116 | 117 |
|
117 |
| -# location /getto { |
118 |
| -# root ./www/html/upload; |
119 |
| -# index vid.mp4; |
120 |
| -# allow_methods GET; |
121 |
| -# autoindex off; |
122 |
| -# } |
123 |
| -# } |
| 118 | + location /getto { |
| 119 | + root ./www/html/upload; |
| 120 | + index vid.mp4; |
| 121 | + allow_methods GET; |
| 122 | + autoindex off; |
| 123 | + } |
| 124 | +} |
124 | 125 |
|
125 | 126 | # server
|
126 | 127 | # {
|
|
0 commit comments