1 server {
2 listen 80;
3 server_name www.abc.com;
4 root /www/tianyi;
5 index index.html index.htm index.php;
6 #charset koi8-r;
7 #access_log /var/log/nginx/host.access.log main;
8
9 location / {
10
11 if (!-e $request_filename) {
12
13 rewrite ^(.*)$ /index.php?s=1ドル last; break;
14
15 }
16
17 }
18
19
20 #error_page 404 /404.html;
21
22 # redirect server error pages to the static page /50x.html
23 #
24 error_page 500 502 503 504 /50x.html;
25 location = /50x.html {
26 root /usr/share/nginx/html;
27 }
28
29 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
30 #
31 #location ~ \.php$ {
32 # proxy_pass http://127.0.0.1;
33 #}
34
35 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
36 #
37 location ~ \.php$ {
38 root /www/tianyi;
39 fastcgi_pass 127.0.0.1:9000;
40 fastcgi_index index.php;
41 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
42 include fastcgi_params;
43 }
44
45 # deny access to .htaccess files, if Apache's document root
46 # concurs with nginx's one
47 #
48 #location ~ /\.ht {
49 # deny all;
50 #}
51 }
52 server {
53 server_name abc.com;
54 rewrite ^(.*)$ http://www.abc.com1ドル permanent;
55 }目前只有首页可以访问ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。