nginx配置cakephp实现伪静态
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
server { listen 80; server_name www.redis.com.cn; rewrite ^(.*) http://redis.com.cn$1 permanent; } server { listen 80; server_name redis.com.cn; # root directive should be global root /var/www/redis.com.cn/public/app/webroot/; access_log /var/www/redis.com.cn/log/access.log; error_log /var/www/redis.com.cn/log/error.log; location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php?$uri&$args; } location ~ .php$ { include /etc/nginx/fcgi.conf; fastcgi_pass 127.0.0.1:10005; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } |
测试下新的评论系统