server { listen 80; #listen [::]:80; server_name www.yourdomain.com; index index.php index.html; access_log off; set $root /home/wwwroot/tang_gate_supplement_system/public; location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ { root $root; } root $root; location @rewrite { rewrite ^(.*)$ index.php/$1 last; } location /{ if ( !-e $request_filename) { rewrite ^(.*)$ /index.php/$1 last; break; } } location ~ [^/]\.php(/|$) { fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; include pathinfo.conf; } }