VPS侦探论坛

 找回密码
 注册
查看: 7549|回复: 2

[Apache] 大家帮我看下LNMP nginx 如何设置 pathinfo 吧

[复制链接]
发表于 2012-7-30 13:29:07 | 显示全部楼层 |阅读模式

我想用这样的链接:是 ThinkPHP http://tp.58ago.com/Ajax/abc
可是我怎么配都不行
  1. log_format  y  '$remote_addr - $remote_user [$time_local] $request '
  2.              '$status $body_bytes_sent $http_referer '
  3.              '$http_user_agent $http_x_forwarded_for';
  4. server
  5. {
  6.         listen       80;
  7.         server_name tp.58ago.com;
  8.         index index.html index.htm index.php default.html default.htm default.php;
  9.         root  /home/www/tp.58ago.com;


  10.         location /Ajax/ {
  11.               if (!-e $request_filename){
  12.                         rewrite ^/Ajax/(.*)$ /Ajax/index.php?s=/$1 last;
  13.               }
  14.         }

  15.         location ~ .*\.(php|php5)?$
  16.         {
  17.                 try_files $uri =404;
  18.                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  19.                 fastcgi_index index.php;
  20.                 include fcgi.conf;
  21.         }

  22.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  23.                 {
  24.                         expires      30d;
  25.                 }

  26.         location ~ .*\.(js|css)?$
  27.                 {
  28.                         expires      12h;
  29.                 }

  30.         access_log  /home/wwwlogs/y.log  y;
  31. }
复制代码

[ 本帖最后由 wyqjx 于 2012-7-30 13:35 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-7-30 15:27:30 | 显示全部楼层
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-7-31 12:00:35 | 显示全部楼层

大哥,我按您的配置 nginx ,
提示 Access Denied
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-17 02:53 , Processed in 0.028252 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表