Advertisement
Kufat

VIP Lounge nginx config

Dec 18th, 2023
1,721
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.66 KB | Software | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4. include /etc/nginx/modules-enabled/*.conf;
  5.  
  6. events {
  7.         worker_connections 768;
  8.         # multi_accept on;
  9. }
  10.  
  11. http {
  12.     server {
  13.         server_name viplounge.irc.scpwiki.com;
  14.  
  15. #    location @catch {
  16. #        root /usr/share/nginx/html;
  17. #       try_files /custom_50x.html /custom_50x.html;
  18. #        internal;
  19. #    }
  20.  
  21.     location /testing {
  22.         fastcgi_pass unix:/does/not/exist;
  23.     }
  24. #               location /curite/ {
  25. #                       proxy_pass http://curite_soc/;
  26. #               }
  27.                 location / {
  28.                         proxy_pass http://127.0.0.1:9000/;
  29.                         proxy_http_version 1.1;
  30.                         proxy_set_header Connection "upgrade";
  31.                         proxy_set_header Upgrade $http_upgrade;
  32.                         proxy_set_header X-Forwarded-For $remote_addr;
  33.                         proxy_set_header X-Forwarded-Proto $scheme;
  34.  
  35.                         # by default nginx times out connections in one minute
  36.                         proxy_read_timeout 1d;
  37.  
  38.                         error_page 500 502 503 504 = @catch;
  39.                 }
  40.  
  41.  
  42.  
  43.     listen 443 ssl; # managed by Certbot
  44.     ssl_certificate /etc/letsencrypt/live/viplounge.irc.scpwiki.com/fullchain.pem; # managed by Certbot
  45.     ssl_certificate_key /etc/letsencrypt/live/viplounge.irc.scpwiki.com/privkey.pem; # managed by Certbot
  46.     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  47.     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  48.  
  49.     listen [::]:443 ssl;
  50. }
  51.  
  52. upstream curite_soc {
  53.         server unix:/tmp/curite.sock;
  54. }
  55.         ##
  56.         # Basic Settings
  57.         ##
  58.  
  59.         sendfile on;
  60.         tcp_nopush on;
  61.         types_hash_max_size 2048;
  62.         client_max_body_size 8m;
  63.         # server_tokens off;
  64.  
  65.         # server_names_hash_bucket_size 64;
  66.         # server_name_in_redirect off;
  67.  
  68.         include /etc/nginx/mime.types;
  69.         default_type application/octet-stream;
  70.  
  71.         ##
  72.         # SSL Settings
  73.         ##
  74.  
  75.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
  76.         ssl_prefer_server_ciphers on;
  77.  
  78.         ##
  79.         # Logging Settings
  80.         ##
  81.  
  82.         access_log /var/log/nginx/access.log;
  83.         error_log /var/log/nginx/error.log;
  84.  
  85.         ##
  86.         # Gzip Settings
  87.         ##
  88.  
  89.         gzip on;
  90.  
  91.         # gzip_vary on;
  92.         # gzip_proxied any;
  93.         # gzip_comp_level 6;
  94.         # gzip_buffers 16 8k;
  95.         # gzip_http_version 1.1;
  96.         # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  97.  
  98.         ##
  99.         # Virtual Host Configs
  100.         ##
  101.  
  102.         include /etc/nginx/conf.d/*.conf;
  103.         include /etc/nginx/sites-enabled/*;
  104.  
  105.         server {
  106.     if ($host = viplounge.irc.scpwiki.com) {
  107.         return 301 https://$host$request_uri;
  108.     } # managed by Certbot
  109.  
  110.  
  111.                 server_name viplounge.irc.scpwiki.com;
  112.     listen 80;
  113.     return 404; # managed by Certbot
  114.  
  115.  
  116. }}
  117.  
  118.  
  119. #mail {
  120. #       # See sample authentication script at:
  121. #       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  122. #
  123. #       # auth_http localhost/auth.php;
  124. #       # pop3_capabilities "TOP" "USER";
  125. #       # imap_capabilities "IMAP4rev1" "UIDPLUS";
  126. #
  127. #       server {
  128. #               listen     localhost:110;
  129. #               protocol   pop3;
  130. #               proxy      on;
  131. #       }
  132. #
  133. #       server {
  134. #               listen     localhost:143;
  135. #               protocol   imap;
  136. #               proxy      on;
  137. #       }
  138. #}
  139.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement