Advertisement
Guest User

Untitled

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