Advertisement
ASMProgrammer

Settinget Nginx Config in Web site (.conf)

Jun 7th, 2023 (edited)
130
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.39 KB | Software | 0 0
  1. user PythonServer;
  2. error_log logs/error.log error;
  3. error_log logs/error.log notice;
  4. error_log logs/error.log info;
  5. error_page /124.0.8.23/error.htm;
  6. recursive_error_pages on;
  7. chunked_transfer_encoding on;
  8. pid /etc/nginx/logs/nginx.pid;
  9. worker_processes auto;
  10. include /etc/nginx/modules-enabled/*.conf;
  11. events {
  12.     worker_connections 1024;
  13.     include /etc/nginx/init.d/nginx.nsi;
  14.     include /etc/nginx/init.d/Makefile;
  15. }
  16. http {
  17.     types {
  18.         text/html              html;
  19.         text/css               css;
  20.         application/javascript js;
  21.         text/xml               xml;
  22.         image/png              png;
  23.         image/ico              ico;
  24.         application/atom+xml   atom;
  25.         application/rss+xml    rss;
  26.         application/sh         sh;
  27.         application/cs         cs;
  28.         application/config     cfg;
  29.         text/php               php;
  30.     }
  31.     server {
  32.         listen 2957 ssl;
  33.         server_name ~^(?<subdomain>,+)\.cnct\.es$;
  34.         client_max_body_size 128m;
  35.  
  36.         ssl_certificate      /etc/letsencrypt/live/cnct.es/SSL-Bootstrap.crt;
  37.         ssl_certificate_key  /etc/letsencrypt/live/cnct.es/SSL-Bootstrap_PrivateKey.crt;
  38.         ssl_session_cache shared:SSL:1m;
  39.         ssl_session_timeout 5m;
  40.         ssl_ciphers HIGH:!aNULL:!MD5;
  41.         ssl_prefer_server_ciphers on;
  42.         access_log logs/access.log combined;
  43.         send_lowat auto;
  44.         server_tokens on;
  45.         server_name_in_redirect on;
  46.         fastcgi_read_timeout 60s;
  47.         fastcgi_buffer_size 40k|80k;
  48.         fastcgi_buffering on;
  49.         fastcgi_buffers 8 40k|80k;
  50.         fastcgi_cache_lock on;
  51.         fastcgi_cache on;
  52.         fastcgi_bind 127.0.8.23:2957 | on;
  53.         fastcgi_busy_buffers_size 80k|16k;
  54.         fastcgi_cache_min_uses 1;
  55.         fastcgi_cache_max_range_offset 100;
  56.         fastcgi_keep_conn on;
  57.         open_file_cache on;
  58.         fastcgi_send_timeout 60s;
  59.         fastcgi_pass_request_body on;
  60.         f4f;
  61.         f4f_buffer_size 5000k;
  62.         fastcgi_force_ranges on;
  63.         open_file_cache_errors on;
  64.         location / {
  65.             proxy_pass http://example.com/;
  66.             proxy_set_header Host $host;
  67.             proxy_set_header X-Real-IP $remote_addr;
  68.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  69.         }
  70.     }
  71.  
  72.     location ~ \.(htm|php|py|shtml)$ {
  73.         root /example/;
  74.     }
  75. }
Advertisement
Comments
  • ASMProgrammer
    334 days (edited)
    # Nginx 0.11 KB | 0 0
    1. A my Nginx config to website, Please correct text in server > root and location > root and set root to .html files
Add Comment
Please, Sign In to add comment
Advertisement