Last active
February 6, 2021 22:52
-
-
Save wildanm/f7446ace51131512acc11a5b1d2d8d35 to your computer and use it in GitHub Desktop.
nginx.conf untuk TAO Platform 3.4.0
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name tao.openthinklabs; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl default_server; | |
ssl_certificate /usr/local/etc/nginx/certs/_wildcard.openthinklabs+1.pem; | |
ssl_certificate_key /usr/local/etc/nginx/certs/_wildcard.openthinklabs+1-key.pem; | |
index index.php index.html; | |
server_name tao.openthinklabs; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
root /var/www/html; | |
location ~ ^/([^//]*)/(views|locales)/. {} | |
location /tao/install {} | |
location /tao/getFileFlysystem.php { | |
rewrite ^(.*)$ /tao/getFileFlysystem.php last; | |
} | |
location / { | |
rewrite ^(.*)$ /index.php; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
sendfile off; | |
fastcgi_read_timeout 300s; | |
client_max_body_size 100m; | |
charset utf-8; | |
# Do not any file starting with . except .well-known | |
location ~ /\.(?!well-known).* { | |
deny all; | |
access_log off; | |
return 404; | |
} | |
# Do not serve any file starting with _ | |
location ~ /_.* { | |
deny all; | |
access_log off; | |
return 404; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass fpm72; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_intercept_errors off; | |
fastcgi_buffer_size 16k; | |
fastcgi_buffers 4 16k; | |
fastcgi_connect_timeout 300s; | |
fastcgi_send_timeout 300s; | |
fastcgi_read_timeout 300s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment