server { listen 80; listen 443 ssl http2; server_name run.laifuzi.test; root "/home/vagrant/php_workspace/likes_com"; index index.html index.php; location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } }
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/run-error.log error;
client_max_body_size 100m;
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
ssl_certificate /etc/nginx/ssl/spl.laifuzi.test.crt;
ssl_certificate_key /etc/nginx/ssl/spl.laifuzi.test.key;
}