无标题文档
wdCP系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdCDN系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
wdOS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdDNS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
注册 发贴 提问 回复-必看必看 wddns免费智能 DNS 开通 本地或虚拟机使 用wdcp 一键包在mysql编 译时"卡住"
【300G高防】双线 无视攻击 wdcp官方技术支持/服务 阿里云8折优惠券 无敌云 腾讯云优惠中,现注册更有260代金额券赠送
返回列表 发帖
提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等

温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的

[求助] nginx下如何绑定二级域名到子目录?

      用wdcp建站时,会自动生public_html目录。这个目录下面有三个子目录,分别是a,b,c,目前想让a.***.com绑定a子目录,b,c也类似设置,请问要如何设置?
查了许多资料,说是要改.conf 文件,在文件管理里点nginx,也找到文件,但不知道应该添加什么。
感谢。

  1. server {
  2.         listen       80;
  3.         server_name ***.com www.***.com *.***.com;
  4.         root /mnt/sdb1/web/bbq/public_html;
  5.         index  index.html index.php index.htm;
  6.         error_page  400 /errpage/400.html;
  7.         error_page  403 /errpage/403.html;
  8.         error_page  404 /errpage/404.html;
  9.         error_page  405 /errpage/405.html;
  10.         location ~ \.php$ {
  11.                 fastcgi_pass   127.0.0.1:9000;
  12.                 fastcgi_index  index.php;
  13.                 include fcgi.conf;
  14.         }
  15.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
  16.                 expires      1d;
  17.         }
  18.         location ~ .*\.(js|css|html|htm)?$ {
  19.                 expires      12h;
  20.         }
  21. }        
复制代码
签名太长~

定义两个不同的server分别指定不同的目录

是这么弄吗?我尝试一下。
签名太长~

TOP

没想到,自己研究成功了,感谢度娘。
签名太长~

TOP

象下面这样设置是不是不对?
  1. server {
  2. listen 80;
  3. server_name ***.com www.***.com *.***.com;
  4. root /mnt/sdb1/web/bbq/public_html;
  5. index index.html index.php index.htm;
  6. error_page 400 /errpage/400.html;
  7. error_page 403 /errpage/403.html;
  8. error_page 404 /errpage/404.html;
  9. error_page 405 /errpage/405.html;
  10. location ~ \.php$ {
  11. fastcgi_pass 127.0.0.1:9000;
  12. fastcgi_index index.php;
  13. include fcgi.conf;
  14. }
  15. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
  16. expires 1d;
  17. }
  18. location ~ .*\.(js|css|html|htm)?$ {
  19. expires 12h;
  20. }
  21. }

  22. server {
  23. listen 80;
  24. server_name bbs.***.com;
  25. root /mnt/sdb1/web/bbq/public_html/bbs;
  26. index index.html index.php index.htm;
  27. error_page 400 /errpage/400.html;
  28. error_page 403 /errpage/403.html;
  29. error_page 404 /errpage/404.html;
  30. error_page 405 /errpage/405.html;
  31. location ~ \.php$ {
  32. fastcgi_pass 127.0.0.1:9000;
  33. fastcgi_index index.php;
  34. include fcgi.conf;
  35. }
  36. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
  37. expires 1d;
  38. }
  39. location ~ .*\.(js|css|html|htm)?$ {
  40. expires 12h;
  41. }
  42. }
复制代码
签名太长~

TOP

其实面板上面就可以绑定的,晕。
放松一下,果然还是有好处的。
签名太长~

TOP

现在才发现?呵呵
看清提问三步曲及多看教程/FAQ索引(wdcp,v3,一键包,wdOS),益处多多.wdcp工具集 阿里云主机8折优惠码

TOP

返回列表