容器技术交流

 找回密码
 立即注册
查看: 4809|回复: 2

关于nginx的vhost配置文件中 x.lum的疑问。

[复制链接]
发表于 2012-3-22 14:12:17 | 显示全部楼层 |阅读模式
本帖最后由 liuzc 于 2012-3-22 14:26 编辑
  1. #-+-+-+-+-+-+-+-+-+-+ id: 2 --- ftp name: ahsbbsftp --- user: zijidelu +-+-+-+-+-+-+-+-+-+

  2. server {
  3.         server_name  bbs.aihuangshi.com *.aihuangshi.com 2.lum;
  4.         listen       80;

  5.         gzip on;

  6.         add_header Thanks 'Welcome to our website!';

  7.         if (-d $request_filename) {

  8.                 rewrite ^/(.*)([^/])$ $scheme://$host/$1$2/ permanent;
  9.         }

  10.         rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
  11. rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
  12. rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
  13. rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
  14. rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
  15. rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
  16. rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
  17. rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last;
  18. rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last;
  19. if (!-e $request_filename) {
  20. return 404;
  21. }

  22.         include proxy_pass.conf;
  23.          proxy_set_header Host $host;

  24.         error_log                /home/hosts_log/2_error.log info;
  25.         access_log                /dev/null lu_access_log_2;

  26.          error_page 403 /__ErrorFiles__/403.html;

  27.          error_page 500 /__ErrorFiles__/500.html;
  28.          error_page 501 /__ErrorFiles__/501.html;
  29.          error_page 502 /__ErrorFiles__/502.html;

  30.          root   /home/ftp/1520/ahsbbsftp-20120320-vcA/bbs.aihuangshi.com/;

  31.          ssi off;
  32.          ssi_silent_errors off;
  33.          ssi_types text/shtml;

  34.         location / {

  35.                  index  index.html index.htm index.shtml index.php;
  36.                  autoindex        off;
  37.         }

  38.         location /nginx_status {
  39.                 stub_status on;
  40.                 access_log off;
  41.         }

  42.         #------------
  43.          location ~* \.(php[3-9]?|phtm[l]?)(\/.*)*$ {

  44.                   fastcgi_pass  127.0.0.1:8999;

  45.                   include enable_php.conf;
  46.          }

  47.         location ~ /\.ht {
  48.                 return 403;
  49.         }

  50.         location ~ (favicon.ico) {
  51.                  expires 1d;
  52.                 log_not_found off;
  53.                 access_log   off;
  54.         }

  55.          location ~* \.(gif|jpg|jpeg|png|bmp|swf)$ {
  56.                  expires 365d;
  57.          }

  58.          location ~* \.(js|css)$ {
  59.                  expires 365d;
  60.          }
  61. }
复制代码


20120322135356.png
 楼主| 发表于 2012-3-22 14:25:54 | 显示全部楼层
我目前的解决办法是直接改模板里的$_G['siteurl'] 这个变量为自己的域名。
但是我想知道的是Nginx的vhost文件里,每个网站都会有一个x.lum,这个作用是什么呢?不能去掉吗?
发表于 2012-3-22 23:41:51 | 显示全部楼层
下一版本会解决
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-5-15 16:57 , Processed in 0.035197 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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