Guest User

Untitled

a guest
Feb 13th, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.00 KB | None | 0 0
  1. root@ubuntu-test:/etc/nginx/conf.d# nginx -T
  2. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  3. nginx: configuration file /etc/nginx/nginx.conf test is successful
  4. # configuration file /etc/nginx/nginx.conf:
  5.  
  6. user nginx;
  7. worker_processes 1;
  8.  
  9. error_log /var/log/nginx/error.log warn;
  10. pid /var/run/nginx.pid;
  11.  
  12.  
  13. events {
  14. worker_connections 1024;
  15. }
  16.  
  17.  
  18. http {
  19. include /etc/nginx/mime.types;
  20. # include /etc/nginx/sites-enabled/*;
  21. #include /etc/nginx/conf.d/*.conf;
  22. default_type application/octet-stream;
  23.  
  24. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  25. '$status $body_bytes_sent "$http_referer" '
  26. '"$http_user_agent" "$http_x_forwarded_for"';
  27.  
  28. access_log /var/log/nginx/access.log main;
  29.  
  30. sendfile on;
  31. #tcp_nopush on;
  32.  
  33. keepalive_timeout 65;
  34.  
  35. #gzip on;
  36.  
  37. include /etc/nginx/conf.d/*.conf;
  38. }
  39.  
  40. # configuration file /etc/nginx/mime.types:
  41.  
  42. types {
  43. text/html html htm shtml;
  44. text/css css;
  45. text/xml xml;
  46. image/gif gif;
  47. image/jpeg jpeg jpg;
  48. application/javascript js;
  49. application/atom+xml atom;
  50. application/rss+xml rss;
  51.  
  52. text/mathml mml;
  53. text/plain txt;
  54. text/vnd.sun.j2me.app-descriptor jad;
  55. text/vnd.wap.wml wml;
  56. text/x-component htc;
  57.  
  58. image/png png;
  59. image/svg+xml svg svgz;
  60. image/tiff tif tiff;
  61. image/vnd.wap.wbmp wbmp;
  62. image/webp webp;
  63. image/x-icon ico;
  64. image/x-jng jng;
  65. image/x-ms-bmp bmp;
  66.  
  67. font/woff woff;
  68. font/woff2 woff2;
  69.  
  70. application/java-archive jar war ear;
  71. application/json json;
  72. application/mac-binhex40 hqx;
  73. application/msword doc;
  74. application/pdf pdf;
  75. application/postscript ps eps ai;
  76. application/rtf rtf;
  77. application/vnd.apple.mpegurl m3u8;
  78. application/vnd.google-earth.kml+xml kml;
  79. application/vnd.google-earth.kmz kmz;
  80. application/vnd.ms-excel xls;
  81. application/vnd.ms-fontobject eot;
  82. application/vnd.ms-powerpoint ppt;
  83. application/vnd.oasis.opendocument.graphics odg;
  84. application/vnd.oasis.opendocument.presentation odp;
  85. application/vnd.oasis.opendocument.spreadsheet ods;
  86. application/vnd.oasis.opendocument.text odt;
  87. application/vnd.openxmlformats-officedocument.presentationml.presentation
  88. pptx;
  89. application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  90. xlsx;
  91. application/vnd.openxmlformats-officedocument.wordprocessingml.document
  92. docx;
  93. application/vnd.wap.wmlc wmlc;
  94. application/x-7z-compressed 7z;
  95. application/x-cocoa cco;
  96. application/x-java-archive-diff jardiff;
  97. application/x-java-jnlp-file jnlp;
  98. application/x-makeself run;
  99. application/x-perl pl pm;
  100. application/x-pilot prc pdb;
  101. application/x-rar-compressed rar;
  102. application/x-redhat-package-manager rpm;
  103. application/x-sea sea;
  104. application/x-shockwave-flash swf;
  105. application/x-stuffit sit;
  106. application/x-tcl tcl tk;
  107. application/x-x509-ca-cert der pem crt;
  108. application/x-xpinstall xpi;
  109. application/xhtml+xml xhtml;
  110. application/xspf+xml xspf;
  111. application/zip zip;
  112.  
  113. application/octet-stream bin exe dll;
  114. application/octet-stream deb;
  115. application/octet-stream dmg;
  116. application/octet-stream iso img;
  117. application/octet-stream msi msp msm;
  118.  
  119. audio/midi mid midi kar;
  120. audio/mpeg mp3;
  121. audio/ogg ogg;
  122. audio/x-m4a m4a;
  123. audio/x-realaudio ra;
  124.  
  125. video/3gpp 3gpp 3gp;
  126. video/mp2t ts;
  127. video/mp4 mp4;
  128. video/mpeg mpeg mpg;
  129. video/quicktime mov;
  130. video/webm webm;
  131. video/x-flv flv;
  132. video/x-m4v m4v;
  133. video/x-mng mng;
  134. video/x-ms-asf asx asf;
  135. video/x-ms-wmv wmv;
  136. video/x-msvideo avi;
  137. }
  138.  
  139. # configuration file /etc/nginx/conf.d/default.conf:
  140. server {
  141. listen 80;
  142. # server_name 127.0.0.1 localhost;
  143. root /usr/share/nginx/html;
  144. index index.php index.html index.htm index.nginx-debian.html;
  145.  
  146. location /rukovoditel/ {
  147. # root /usr/share/nginx/html;
  148. index index.php index.html index.htm index.nginx-debian.html;
  149. }
  150.  
  151.  
  152. location / {
  153. try_files $uri $uri/ =404;
  154. }
  155.  
  156. location ~ \.php$ {
  157. include fastcgi_params;
  158. fastcgi_intercept_errors on;
  159. fastcgi_pass unix:/run/php/php7.2-fpm.sock;
  160. fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  161. }
  162.  
  163. location ~ /\.ht {
  164. deny all;
  165. }
  166. }
  167.  
  168. # configuration file /etc/nginx/fastcgi_params:
  169.  
  170. fastcgi_param QUERY_STRING $query_string;
  171. fastcgi_param REQUEST_METHOD $request_method;
  172. fastcgi_param CONTENT_TYPE $content_type;
  173. fastcgi_param CONTENT_LENGTH $content_length;
  174.  
  175. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  176. fastcgi_param REQUEST_URI $request_uri;
  177. fastcgi_param DOCUMENT_URI $document_uri;
  178. fastcgi_param DOCUMENT_ROOT $document_root;
  179. fastcgi_param SERVER_PROTOCOL $server_protocol;
  180. fastcgi_param REQUEST_SCHEME $scheme;
  181. fastcgi_param HTTPS $https if_not_empty;
  182.  
  183. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  184. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  185.  
  186. fastcgi_param REMOTE_ADDR $remote_addr;
  187. fastcgi_param REMOTE_PORT $remote_port;
  188. fastcgi_param SERVER_ADDR $server_addr;
  189. fastcgi_param SERVER_PORT $server_port;
  190. fastcgi_param SERVER_NAME $server_name;
  191.  
  192. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  193. fastcgi_param REDIRECT_STATUS 200;
Add Comment
Please, Sign In to add comment