Guest User

Untitled

a guest
Jan 10th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.13 KB | None | 0 0
  1. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  2. nginx: configuration file /etc/nginx/nginx.conf test is successful
  3. # configuration file /etc/nginx/nginx.conf:
  4. user www-data;
  5. worker_processes auto;
  6. pid /run/nginx.pid;
  7. include /etc/nginx/modules-enabled/*.conf;
  8.  
  9. events {
  10. worker_connections 768;
  11. # multi_accept on;
  12. }
  13.  
  14. http {
  15.  
  16. ##
  17. # Basic Settings
  18. client_max_body_size 64M;
  19.  
  20. sendfile on;
  21. tcp_nopush on;
  22. tcp_nodelay on;
  23. keepalive_timeout 65;
  24. types_hash_max_size 2048;
  25. server_tokens off;
  26.  
  27. # server_names_hash_bucket_size 64;
  28. # server_name_in_redirect off;
  29.  
  30. include /etc/nginx/mime.types;
  31. default_type application/octet-stream;
  32.  
  33. ##
  34. # SSL Settings
  35. ##
  36.  
  37. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  38. ssl_prefer_server_ciphers on;
  39.  
  40. ##
  41. # Logging Settings
  42. ##
  43.  
  44. access_log /var/log/nginx/access.log;
  45. error_log /var/log/nginx/error.log;
  46.  
  47. ##
  48. # Gzip Settings
  49. ##
  50.  
  51. gzip on;
  52. gzip_disable "msie6";
  53.  
  54. gzip_vary on;
  55. gzip_proxied any;
  56. gzip_comp_level 6;
  57. gzip_buffers 16 8k;
  58. gzip_http_version 1.1;
  59. gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  60.  
  61. ##
  62. # Virtual Host Configs
  63. ##
  64.  
  65. include /etc/nginx/conf.d/*.conf;
  66. include /etc/nginx/sites-enabled/*;
  67. server {
  68. listen 80;
  69. }
  70. }
  71.  
  72.  
  73. #mail {
  74. # # See sample authentication script at:
  75. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  76. #
  77. # # auth_http localhost/auth.php;
  78. # # pop3_capabilities "TOP" "USER";
  79. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  80. #
  81. # server {
  82. # listen localhost:110;
  83. # protocol pop3;
  84. # proxy on;
  85. # }
  86. #
  87. # server {
  88. # listen localhost:143;
  89. # protocol imap;
  90. # proxy on;
  91. # }
  92. #}
  93.  
  94. # configuration file /etc/nginx/modules-enabled/50-mod-http-auth-pam.conf:
  95. load_module modules/ngx_http_auth_pam_module.so;
  96.  
  97. # configuration file /etc/nginx/modules-enabled/50-mod-http-dav-ext.conf:
  98. load_module modules/ngx_http_dav_ext_module.so;
  99.  
  100. # configuration file /etc/nginx/modules-enabled/50-mod-http-echo.conf:
  101. load_module modules/ngx_http_echo_module.so;
  102.  
  103. # configuration file /etc/nginx/modules-enabled/50-mod-http-geoip.conf:
  104. load_module modules/ngx_http_geoip_module.so;
  105.  
  106. # configuration file /etc/nginx/modules-enabled/50-mod-http-image-filter.conf:
  107. load_module modules/ngx_http_image_filter_module.so;
  108.  
  109. # configuration file /etc/nginx/modules-enabled/50-mod-http-subs-filter.conf:
  110. load_module modules/ngx_http_subs_filter_module.so;
  111.  
  112. # configuration file /etc/nginx/modules-enabled/50-mod-http-upstream-fair.conf:
  113. load_module modules/ngx_http_upstream_fair_module.so;
  114.  
  115. # configuration file /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf:
  116. load_module modules/ngx_http_xslt_filter_module.so;
  117.  
  118. # configuration file /etc/nginx/modules-enabled/50-mod-mail.conf:
  119. load_module modules/ngx_mail_module.so;
  120.  
  121. # configuration file /etc/nginx/modules-enabled/50-mod-stream.conf:
  122. load_module modules/ngx_stream_module.so;
  123.  
  124. # configuration file /etc/nginx/mime.types:
  125.  
  126. types {
  127. text/html html htm shtml;
  128. text/css css;
  129. text/xml xml;
  130. image/gif gif;
  131. image/jpeg jpeg jpg;
  132. application/javascript js;
  133. application/atom+xml atom;
  134. application/rss+xml rss;
  135.  
  136. text/mathml mml;
  137. text/plain txt;
  138. text/vnd.sun.j2me.app-descriptor jad;
  139. text/vnd.wap.wml wml;
  140. text/x-component htc;
  141.  
  142. image/png png;
  143. image/tiff tif tiff;
  144. image/vnd.wap.wbmp wbmp;
  145. image/x-icon ico;
  146. image/x-jng jng;
  147. image/x-ms-bmp bmp;
  148. image/svg+xml svg svgz;
  149. image/webp webp;
  150.  
  151. application/font-woff woff;
  152. application/java-archive jar war ear;
  153. application/json json;
  154. application/mac-binhex40 hqx;
  155. application/msword doc;
  156. application/pdf pdf;
  157. application/postscript ps eps ai;
  158. application/rtf rtf;
  159. application/vnd.apple.mpegurl m3u8;
  160. application/vnd.ms-excel xls;
  161. application/vnd.ms-fontobject eot;
  162. application/vnd.ms-powerpoint ppt;
  163. application/vnd.wap.wmlc wmlc;
  164. application/vnd.google-earth.kml+xml kml;
  165. application/vnd.google-earth.kmz kmz;
  166. application/x-7z-compressed 7z;
  167. application/x-cocoa cco;
  168. application/x-java-archive-diff jardiff;
  169. application/x-java-jnlp-file jnlp;
  170. application/x-makeself run;
  171. application/x-perl pl pm;
  172. application/x-pilot prc pdb;
  173. application/x-rar-compressed rar;
  174. application/x-redhat-package-manager rpm;
  175. application/x-sea sea;
  176. application/x-shockwave-flash swf;
  177. application/x-stuffit sit;
  178. application/x-tcl tcl tk;
  179. application/x-x509-ca-cert der pem crt;
  180. application/x-xpinstall xpi;
  181. application/xhtml+xml xhtml;
  182. application/xspf+xml xspf;
  183. application/zip zip;
  184.  
  185. application/octet-stream bin exe dll;
  186. application/octet-stream deb;
  187. application/octet-stream dmg;
  188. application/octet-stream iso img;
  189. application/octet-stream msi msp msm;
  190.  
  191. application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
  192. application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
  193. application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
  194.  
  195. audio/midi mid midi kar;
  196. audio/mpeg mp3;
  197. audio/ogg ogg;
  198. audio/x-m4a m4a;
  199. audio/x-realaudio ra;
  200.  
  201. video/3gpp 3gpp 3gp;
  202. video/mp2t ts;
  203. video/mp4 mp4;
  204. video/mpeg mpeg mpg;
  205. video/quicktime mov;
  206. video/webm webm;
  207. video/x-flv flv;
  208. video/x-m4v m4v;
  209. video/x-mng mng;
  210. video/x-ms-asf asx asf;
  211. video/x-ms-wmv wmv;
  212. video/x-msvideo avi;
  213. }
  214.  
  215. # configuration file /etc/nginx/sites-enabled/default:
  216. ##
  217. # You should look at the following URL's in order to grasp a solid understanding
  218. # of Nginx configuration files in order to fully unleash the power of Nginx.
  219. # https://www.nginx.com/resources/wiki/start/
  220. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  221. # https://wiki.debian.org/Nginx/DirectoryStructure
  222. #
  223. # In most cases, administrators will remove this file from sites-enabled/ and
  224. # leave it as reference inside of sites-available where it will continue to be
  225. # updated by the nginx packaging team.
  226. #
  227. # This file will automatically load configuration files provided by other
  228. # applications, such as Drupal or Wordpress. These applications will be made
  229. # available underneath a path with that package name, such as /drupal8.
  230. #
  231. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  232. ##
  233.  
  234. # Default server configuration
  235. #
  236. server {
  237. listen 192.168.56.10:81;
  238. listen [::]:81 default_server;
  239.  
  240. # SSL configuration
  241. #
  242. # listen 443 ssl default_server;
  243. # listen [::]:443 ssl default_server;
  244. #
  245. # Note: You should disable gzip for SSL traffic.
  246. # See: https://bugs.debian.org/773332
  247. #
  248. # Read up on ssl_ciphers to ensure a secure configuration.
  249. # See: https://bugs.debian.org/765782
  250. #
  251. # Self signed certs generated by the ssl-cert package
  252. # Don't use them in a production server!
  253. #
  254. # include snippets/snakeoil.conf;
  255.  
  256. root /var/www/html;
  257.  
  258. # Add index.php to the list if you are using PHP
  259. index index.html index.htm index.nginx-debian.html;
  260.  
  261. server_name _;
  262.  
  263. location / {
  264. proxy_pass http://127.0.0.1;
  265. proxy_read_timeout 600;
  266. proxy_set_header Host $host;
  267. proxy_set_header X-Real-IP $remote_addr;
  268. proxy_set_header X-Forwarded-For $remote_addr;
  269. proxy_buffering off;
  270. }
  271.  
  272. # pass PHP scripts to FastCGI server
  273. #
  274. #location ~ \.php$ {
  275. # include snippets/fastcgi-php.conf;
  276. #
  277. # # With php-fpm (or other unix sockets):
  278. # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  279. # fastcgi_pass 127.0.0.1:9000;
  280. #}
  281.  
  282. # deny access to .htaccess files, if Apache's document root
  283. # concurs with nginx's one
  284. #
  285. #location ~ /\.ht {
  286. # deny all;
  287. #}
  288. }
  289.  
  290.  
  291. # Virtual Host configuration for example.com
  292. #
  293. # You can move that to a different file under sites-available/ and symlink that
  294. # to sites-enabled/ to enable it.
  295. #
  296. #server {
  297. # listen 80;
  298. # listen [::]:80;
  299. #
  300. # server_name example.com;
  301. #
  302. # root /var/www/example.com;
  303. # index index.html;
  304. #
  305. # location / {
  306. # try_files $uri $uri/ =404;
  307. # }
  308. #}
  309.  
  310. # configuration file /etc/nginx/sites-enabled/www.site.ru.conf:
  311. server {
  312.  
  313. listen 192.168.56.10:81;
  314. server_name www.site.ru site.ru;
  315.  
  316. access_log /var/www/site.ru/logs/www.site.ru.access.log;
  317. error_log /var/www/site.ru/logs/www.site.ru.error.log;
  318.  
  319. location /
  320. {
  321. proxy_pass http://127.0.0.1/;
  322. proxy_read_timeout 600;
  323. proxy_set_header Host $host;
  324. proxy_set_header X-Real-IP $remote_addr;
  325. proxy_set_header X-Forwarded-For $remote_addr;
  326. proxy_buffering off;
  327. }
  328. location ~* .(txt|jpg|jpeg|gif|mpg|mpeg|avi|png|css|swf|ico|zip|rar|sdt|js|bmp|wav|mp3|mmf|mid|vkp|sisx|sis|exe|jar|thm|nth|doc)$ {
  329. root /var/www/site.ru/html;
  330. expires 2d;
  331. }
  332.  
  333. }
Advertisement
Add Comment
Please, Sign In to add comment