Editing Nginx directives
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
*<code>[[client_max_body_size]]</code> | *<code>[[client_max_body_size]]</code> | ||
− | *<code>[[server_name]] YOUR_DOMAIN.COM;</code><ref>http://nginx.org/en/docs/http/server_names.html | + | *<code>[[server_name]] YOUR_DOMAIN.COM;</code><ref>http://nginx.org/en/docs/http/server_names.html |
− | + | root /var/www/your_domain;</ref> | |
− | + | :<code>listen</code><ref>http://nginx.org/en/docs/http/ngx_http_core_module.html#listen</ref> | |
::<code>listen 443 ssl;</code> | ::<code>listen 443 ssl;</code> | ||
::<code>listen 80;</code> | ::<code>listen 80;</code> | ||
− | + | :<code>[[try_files]] $uri $uri/ @rewrite;</code> | |
* <code>[[fastcgi_pass]]</code> (Used for [[PHP]]) | * <code>[[fastcgi_pass]]</code> (Used for [[PHP]]) | ||
Line 21: | Line 21: | ||
* <code>[[return]]</code> | * <code>[[return]]</code> | ||
− | + | :<code>worker_processes auto;</code> | |
− | + | :<code>[[sendfile]] on;</code><ref>https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/#enabling-sendfile</ref> | |
− | + | :<code>include /etc/nginx/mime.types;</code> | |
− | + | :<code>tcp_nopush on;</code> | |
− | + | :<code>[[tcp_nodelay]] on;</code> | |
− | + | :<code>[[chunked_transfer_encoding]]</code> | |
− | + | :<code>server_tokens off;</code> (Context: http, server, location) (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens) | |
− | |||
[[Proxy]] (Nginx can proxy requests using http, [[FastCGI]], uwsgi, SCGI, or memcached.) | [[Proxy]] (Nginx can proxy requests using http, [[FastCGI]], uwsgi, SCGI, or memcached.) | ||
− | + | :<code>proxy_read_timeout 2400s;</code> | |
− | + | :<code>proxy_connect_timeout 75s;</code> | |
− | + | :<code>proxy_send_timeout 2400s;</code> | |
− | + | :<code>proxy_buffer_size 32k;</code> | |
− | + | :<code>proxy_buffers 40 32k;</code> | |
− | + | :<code>proxy_busy_buffers_size 64k;</code> | |
− | + | :<code>proxy_temp_file_write_size 250m;</code> | |
− | + | :<code>proxy_http_version 1.1;</code> | |
− | + | :<code>proxy_redirect [default|off|redirect replacement]</code><ref>http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect</ref> | |
+ | |||
− | |||
[[SSL]] (See also: <code>[[certbot]]</code>) | [[SSL]] (See also: <code>[[certbot]]</code>) | ||
{{nginx SSL directives}} | {{nginx SSL directives}} |
Advertising: