Advertisement
Guest User

Untitled

a guest
Apr 7th, 2021
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. root@v2202007122499122510:~# sudo 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. #some fix just for fun
  18. server_names_hash_bucket_size 64;
  19.  
  20.  
  21. ##
  22. # Basic Settings
  23. ##
  24.  
  25. sendfile on;
  26. tcp_nopush on;
  27. tcp_nodelay on;
  28. keepalive_timeout 65;
  29. types_hash_max_size 2048;
  30. # server_tokens off;
  31.  
  32. # server_names_hash_bucket_size 64;
  33. # server_name_in_redirect off;
  34.  
  35. include /etc/nginx/mime.types;
  36. default_type application/octet-stream;
  37.  
  38. ##
  39. # SSL Settings
  40. ##
  41.  
  42. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  43. ssl_prefer_server_ciphers on;
  44.  
  45. ##
  46. # Logging Settings
  47. ##
  48.  
  49. access_log /var/log/nginx/access.log;
  50. error_log /var/log/nginx/error.log;
  51.  
  52. ##
  53. # Gzip Settings
  54. ##
  55.  
  56. gzip on;
  57.  
  58. # gzip_vary on;
  59. # gzip_proxied any;
  60. # gzip_comp_level 6;
  61. # gzip_buffers 16 8k;
  62. # gzip_http_version 1.1;
  63. # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  64.  
  65. ##
  66. # Virtual Host Configs
  67. ##
  68.  
  69. include /etc/nginx/conf.d/*.conf;
  70. include /etc/nginx/sites-enabled/*;
  71.  
  72. client_max_body_size 2M;
  73. }
  74.  
  75.  
  76. #mail {
  77. # # See sample authentication script at:
  78. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  79. #
  80. # # auth_http localhost/auth.php;
  81. # # pop3_capabilities "TOP" "USER";
  82. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  83. #
  84. # server {
  85. # listen localhost:110;
  86. # protocol pop3;
  87. # proxy on;
  88. # }
  89. #
  90. # server {
  91. # listen localhost:143;
  92. # protocol imap;
  93. # proxy on;
  94. # }
  95. #}
  96.  
  97. # configuration file /etc/nginx/modules-enabled/50-mod-http-auth-pam.conf:
  98. load_module modules/ngx_http_auth_pam_module.so;
  99.  
  100. # configuration file /etc/nginx/modules-enabled/50-mod-http-dav-ext.conf:
  101. load_module modules/ngx_http_dav_ext_module.so;
  102.  
  103. # configuration file /etc/nginx/modules-enabled/50-mod-http-echo.conf:
  104. load_module modules/ngx_http_echo_module.so;
  105.  
  106. # configuration file /etc/nginx/modules-enabled/50-mod-http-geoip.conf:
  107. load_module modules/ngx_http_geoip_module.so;
  108.  
  109. # configuration file /etc/nginx/modules-enabled/50-mod-http-image-filter.conf:
  110. load_module modules/ngx_http_image_filter_module.so;
  111.  
  112. # configuration file /etc/nginx/modules-enabled/50-mod-http-subs-filter.conf:
  113. load_module modules/ngx_http_subs_filter_module.so;
  114.  
  115. # configuration file /etc/nginx/modules-enabled/50-mod-http-upstream-fair.conf:
  116. load_module modules/ngx_http_upstream_fair_module.so;
  117.  
  118. # configuration file /etc/nginx/modules-enabled/50-mod-http-xslt-filter.conf:
  119. load_module modules/ngx_http_xslt_filter_module.so;
  120.  
  121. # configuration file /etc/nginx/modules-enabled/50-mod-mail.conf:
  122. load_module modules/ngx_mail_module.so;
  123.  
  124. # configuration file /etc/nginx/modules-enabled/50-mod-stream.conf:
  125. load_module modules/ngx_stream_module.so;
  126.  
  127. # configuration file /etc/nginx/mime.types:
  128.  
  129. types {
  130. text/html html htm shtml;
  131. text/css css;
  132. text/xml xml;
  133. image/gif gif;
  134. image/jpeg jpeg jpg;
  135. application/javascript js;
  136. application/atom+xml atom;
  137. application/rss+xml rss;
  138.  
  139. text/mathml mml;
  140. text/plain txt;
  141. text/vnd.sun.j2me.app-descriptor jad;
  142. text/vnd.wap.wml wml;
  143. text/x-component htc;
  144.  
  145. image/png png;
  146. image/tiff tif tiff;
  147. image/vnd.wap.wbmp wbmp;
  148. image/x-icon ico;
  149. image/x-jng jng;
  150. image/x-ms-bmp bmp;
  151. image/svg+xml svg svgz;
  152. image/webp webp;
  153.  
  154. application/font-woff woff;
  155. application/java-archive jar war ear;
  156. application/json json;
  157. application/mac-binhex40 hqx;
  158. application/msword doc;
  159. application/pdf pdf;
  160. application/postscript ps eps ai;
  161. application/rtf rtf;
  162. application/vnd.apple.mpegurl m3u8;
  163. application/vnd.ms-excel xls;
  164. application/vnd.ms-fontobject eot;
  165. application/vnd.ms-powerpoint ppt;
  166. application/vnd.wap.wmlc wmlc;
  167. application/vnd.google-earth.kml+xml kml;
  168. application/vnd.google-earth.kmz kmz;
  169. application/x-7z-compressed 7z;
  170. application/x-cocoa cco;
  171. application/x-java-archive-diff jardiff;
  172. application/x-java-jnlp-file jnlp;
  173. application/x-makeself run;
  174. application/x-perl pl pm;
  175. application/x-pilot prc pdb;
  176. application/x-rar-compressed rar;
  177. application/x-redhat-package-manager rpm;
  178. application/x-sea sea;
  179. application/x-shockwave-flash swf;
  180. application/x-stuffit sit;
  181. application/x-tcl tcl tk;
  182. application/x-x509-ca-cert der pem crt;
  183. application/x-xpinstall xpi;
  184. application/xhtml+xml xhtml;
  185. application/xspf+xml xspf;
  186. application/zip zip;
  187.  
  188. application/octet-stream bin exe dll;
  189. application/octet-stream deb;
  190. application/octet-stream dmg;
  191. application/octet-stream iso img;
  192. application/octet-stream msi msp msm;
  193.  
  194. application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
  195. application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
  196. application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
  197.  
  198. audio/midi mid midi kar;
  199. audio/mpeg mp3;
  200. audio/ogg ogg;
  201. audio/x-m4a m4a;
  202. audio/x-realaudio ra;
  203.  
  204. video/3gpp 3gpp 3gp;
  205. video/mp2t ts;
  206. video/mp4 mp4;
  207. video/mpeg mpeg mpg;
  208. video/quicktime mov;
  209. video/webm webm;
  210. video/x-flv flv;
  211. video/x-m4v m4v;
  212. video/x-mng mng;
  213. video/x-ms-asf asx asf;
  214. video/x-ms-wmv wmv;
  215. video/x-msvideo avi;
  216. }
  217.  
  218. # configuration file /etc/nginx/sites-enabled/dashboard:
  219. server {
  220.  
  221. root /var/www/html/dashboard;
  222.  
  223. index index.php index.html index.htm;
  224.  
  225. server_name dashboard.silverzone.me;
  226.  
  227. location / {
  228. proxy_pass http://localhost:1337;
  229. }
  230.  
  231. location ~ /\.ht {
  232. deny all;
  233. }
  234.  
  235. listen [::]:443 ssl ipv6only=on; # managed by Certbot
  236. listen 443 ssl; # managed by Certbot
  237. ssl_certificate /etc/letsencrypt/live/dashboard.silverzone.me/fullchain.pem; # managed by Certbot
  238. ssl_certificate_key /etc/letsencrypt/live/dashboard.silverzone.me/privkey.pem; # managed by Certbot
  239. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  240. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  241.  
  242.  
  243.  
  244. }
  245.  
  246.  
  247. server {
  248. if ($host = dashboard.silverzone.me) {
  249. return 301 https://$host$request_uri;
  250. } # managed by Certbot
  251.  
  252.  
  253. listen 80;
  254. listen [::]:80;
  255.  
  256. server_name dashboard.silverzone.me;
  257. return 404; # managed by Certbot
  258.  
  259.  
  260. }
  261. # configuration file /etc/letsencrypt/options-ssl-nginx.conf:
  262. # This file contains important security parameters. If you modify this file
  263. # manually, Certbot will be unable to automatically provide future security
  264. # updates. Instead, Certbot will print and log an error message with a path to
  265. # the up-to-date file that you will need to refer to when manually updating
  266. # this file.
  267.  
  268. ssl_session_cache shared:le_nginx_SSL:10m;
  269. ssl_session_timeout 1440m;
  270. ssl_session_tickets off;
  271.  
  272. ssl_protocols TLSv1.2 TLSv1.3;
  273. ssl_prefer_server_ciphers off;
  274.  
  275. ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
  276.  
  277. # configuration file /etc/nginx/sites-enabled/default:
  278. ##
  279. # You should look at the following URL's in order to grasp a solid understanding
  280. # of Nginx configuration files in order to fully unleash the power of Nginx.
  281. # https://www.nginx.com/resources/wiki/start/
  282. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  283. # https://wiki.debian.org/Nginx/DirectoryStructure
  284. #
  285. # In most cases, administrators will remove this file from sites-enabled/ and
  286. # leave it as reference inside of sites-available where it will continue to be
  287. # updated by the nginx packaging team.
  288. #
  289. # This file will automatically load configuration files provided by other
  290. # applications, such as Drupal or Wordpress. These applications will be made
  291. # available underneath a path with that package name, such as /drupal8.
  292. #
  293. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  294. ##
  295.  
  296. # Default server configuration
  297. #
  298. server {
  299. listen 80 default_server;
  300. listen [::]:80 default_server;
  301.  
  302. # SSL configuration
  303. #
  304. # listen 443 ssl default_server;
  305. # listen [::]:443 ssl default_server;
  306. #
  307. # Note: You should disable gzip for SSL traffic.
  308. # See: https://bugs.debian.org/773332
  309. #
  310. # Read up on ssl_ciphers to ensure a secure configuration.
  311. # See: https://bugs.debian.org/765782
  312. #
  313. # Self signed certs generated by the ssl-cert package
  314. # Don't use them in a production server!
  315. #
  316. # include snippets/snakeoil.conf;
  317.  
  318. root /var/www/html;
  319.  
  320. # Add index.php to the list if you are using PHP
  321. index index.php index.html index.htm;
  322.  
  323. server_name 5.45.106.189;
  324.  
  325. location / {
  326. # First attempt to serve request as file, then
  327. # as directory, then fall back to displaying a 404.
  328. try_files $uri $uri/ =404;
  329. }
  330.  
  331. # pass PHP scripts to FastCGI server
  332. #
  333. location ~ \.php$ {
  334. include snippets/fastcgi-php.conf;
  335. #
  336. # # With php-fpm (or other unix sockets):
  337. fastcgi_pass unix:/run/php/php7.3-fpm.sock;
  338. # # With php-cgi (or other tcp sockets):
  339. # fastcgi_pass 127.0.0.1:9000;
  340. }
  341.  
  342. # deny access to .htaccess files, if Apache's document root
  343. # concurs with nginx's one
  344. #
  345. location ~ /\.ht {
  346. deny all;
  347. }
  348. }
  349.  
  350.  
  351. # Virtual Host configuration for example.com
  352. #
  353. # You can move that to a different file under sites-available/ and symlink that
  354. # to sites-enabled/ to enable it.
  355. #
  356. #server {
  357. # listen 80;
  358. # listen [::]:80;
  359. #
  360. # server_name example.com;
  361. #
  362. # root /var/www/example.com;
  363. # index index.html;
  364. #
  365. # location / {
  366. # try_files $uri $uri/ =404;
  367. # }
  368. #}
  369.  
  370. # configuration file /etc/nginx/snippets/fastcgi-php.conf:
  371. # regex to split $uri to $fastcgi_script_name and $fastcgi_path
  372. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  373.  
  374. # Check that the PHP script exists before passing it
  375. try_files $fastcgi_script_name =404;
  376.  
  377. # Bypass the fact that try_files resets $fastcgi_path_info
  378. # see: http://trac.nginx.org/nginx/ticket/321
  379. set $path_info $fastcgi_path_info;
  380. fastcgi_param PATH_INFO $path_info;
  381.  
  382. fastcgi_index index.php;
  383. include fastcgi.conf;
  384.  
  385. # configuration file /etc/nginx/fastcgi.conf:
  386.  
  387. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  388. fastcgi_param QUERY_STRING $query_string;
  389. fastcgi_param REQUEST_METHOD $request_method;
  390. fastcgi_param CONTENT_TYPE $content_type;
  391. fastcgi_param CONTENT_LENGTH $content_length;
  392.  
  393. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  394. fastcgi_param REQUEST_URI $request_uri;
  395. fastcgi_param DOCUMENT_URI $document_uri;
  396. fastcgi_param DOCUMENT_ROOT $document_root;
  397. fastcgi_param SERVER_PROTOCOL $server_protocol;
  398. fastcgi_param REQUEST_SCHEME $scheme;
  399. fastcgi_param HTTPS $https if_not_empty;
  400.  
  401. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  402. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  403.  
  404. fastcgi_param REMOTE_ADDR $remote_addr;
  405. fastcgi_param REMOTE_PORT $remote_port;
  406. fastcgi_param SERVER_ADDR $server_addr;
  407. fastcgi_param SERVER_PORT $server_port;
  408. fastcgi_param SERVER_NAME $server_name;
  409.  
  410. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  411. fastcgi_param REDIRECT_STATUS 200;
  412.  
Advertisement
RAW Paste Data Copied
Advertisement