server { listen 80; ## listen for ipv4; this line is default and implied listen [::]:80 default ipv6only=on; ## listen for ipv6 root /var/www/html/public; index index.php index.html index.htm; access_log /var/log/nginx/access.log logstash; # Make site accessible from http://localhost/ server_name _; # Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html sendfile off; client_max_body_size 64M; # deny access to . files, for security # location ~ /\. { log_not_found off; deny all; } location ^~ /.well-known { allow all; auth_basic off; } add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff"; index index.html index.htm index.php; charset utf-8; rewrite ^/uploadfile/ https://sancdiabeteswebn201.blob.core.chinacloudapi.cn${DOLLAR}request_uri? permanent; location /web { proxy_pass ${PROXY_URL}; proxy_http_version 1.1; proxy_set_header Upgrade ${DOLLAR}http_upgrade; proxy_set_header Connection "Upgrade"; } location ^~ / { proxy_pass ${NUXT_HOST}; proxy_http_version 1.1; proxy_set_header Upgrade ${DOLLAR}http_upgrade; proxy_set_header Connection "Upgrade"; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } error_page 404 /index.php; location ~ \.php${DOLLAR} { fastcgi_pass unix:/var/run/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME ${DOLLAR}realpath_root${DOLLAR}fastcgi_script_name; include fastcgi_params; } location ~ /\.(?!well-known).* { deny all; } location ~* \.(jpg|jpeg|gif|png|css|js|ico|webp|tiff|ttf|svg)${DOLLAR} { expires 5d; } }