Created
April 18, 2020 22:40
-
-
Save fabianosantosnet/338f6682d7c52c82a0880904526464b1 to your computer and use it in GitHub Desktop.
Configuração do NGINX utilizada no tutorial do BLUDIT CMS com WMNP 3.2.2 e deve ser substituido o conteúdo do arquivo em C:\Wnmp\conf\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
error_log logs/error.log; | |
pid logs/nginx.pid; | |
events { | |
# Max value 16384 | |
worker_connections 8192; | |
# Accept multiple connections | |
multi_accept on; | |
} | |
# Settings that affect all server blocks | |
http { | |
include php_processes.conf; | |
include mime.types; | |
default_type application/octet-stream; | |
access_log logs/access.log; | |
sendfile on; | |
keepalive_timeout 65; | |
ssl_session_timeout 10m; | |
ssl_protocols TLSv1.2 TLSv1.1 TLSv1 SSLv3; | |
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5:!DSS; | |
ssl_prefer_server_ciphers on; | |
gzip on; | |
# http server | |
# Begin HTTP Server | |
server { | |
listen 80; # IPv4 | |
server_name localhost; | |
## Parametrization using hostname of access and log filenames. | |
access_log logs/localhost_access.log; | |
error_log logs/localhost_error.log; | |
## Root and index files. | |
root html; | |
index index.php index.html index.htm; | |
## If no favicon exists return a 204 (no content error). | |
location = /favicon.ico { | |
try_files $uri =204; | |
log_not_found off; | |
access_log off; | |
} | |
## Don't log robots.txt requests. | |
location = /robots.txt { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} | |
## Try the requested URI as files before handling it to PHP. | |
location / { | |
## Regular PHP processing. | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass php_processes; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
## Static files | |
location ~ \.(jpg|jpeg|gif|png|css|js|ico|svg|eot|ttf|woff|woff2|otf)$ { | |
expires 30d; | |
access_log off; | |
log_not_found off; | |
## No need to bleed constant updates. Send the all shebang in one | |
## fell swoop. | |
tcp_nodelay off; | |
## Set the OS file cache. | |
open_file_cache max=1000 inactive=120s; | |
open_file_cache_valid 45s; | |
open_file_cache_min_uses 2; | |
open_file_cache_errors off; | |
} | |
## Keep a tab on the 'big' static files. | |
location ~* ^.+\.(?:ogg|pdf|pptx?)$ { | |
expires 30d; | |
## No need to bleed constant updates. Send the all shebang in one | |
## fell swoop. | |
tcp_nodelay off; | |
} | |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
location ^~ /bl-content/databases/ { deny all; } | |
location ^~ /bl-content/workspaces/ { deny all; } | |
location ^~ /bl-content/pages/ { deny all; } | |
location ^~ /bl-kernel/*.php { deny all; } | |
} # / location | |
} | |
# End HTTP Server | |
# Begin HTTPS Server | |
server { | |
listen 443 http2 ssl; | |
server_name localhost; | |
ssl_certificate cert.pem; | |
ssl_certificate_key key.pem; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 10m; | |
## Parametrization using hostname of access and log filenames. | |
access_log logs/localhost_access.log; | |
error_log logs/localhost_error.log; | |
## Root and index files. | |
root html; | |
index index.php index.html index.htm; | |
## If no favicon exists return a 204 (no content error). | |
location = /favicon.ico { | |
try_files $uri =204; | |
log_not_found off; | |
access_log off; | |
} | |
## Don't log robots.txt requests. | |
location = /robots.txt { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} | |
## Try the requested URI as files before handling it to PHP. | |
location / { | |
## Regular PHP processing. | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass php_processes; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
## Static files are served directly. | |
location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ { | |
expires max; | |
log_not_found off; | |
## No need to bleed constant updates. Send the all shebang in one | |
## fell swoop. | |
tcp_nodelay off; | |
## Set the OS file cache. | |
open_file_cache max=1000 inactive=120s; | |
open_file_cache_valid 45s; | |
open_file_cache_min_uses 2; | |
open_file_cache_errors off; | |
} | |
## Keep a tab on the 'big' static files. | |
location ~* ^.+\.(?:ogg|pdf|pptx?)$ { | |
expires 30d; | |
## No need to bleed constant updates. Send the all shebang in one | |
## fell swoop. | |
tcp_nodelay off; | |
} | |
} # / location | |
} # End HTTPS Server | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment