当前位置: 首页 > news >正文

河南县网站建设公司800元做小程序网站

河南县网站建设公司,800元做小程序网站,旅游网站开发背景,教育网站制作下载网站的目录结构为: # tree /home/wwwroot/landui.com /home/wwwroot/landui.com ├── bbs │ └── index.html └── www └── index.html 2 directories, 2 files /home/wwwroot/landui.com为nginx的安装目录下默认的存放源代码的路径。 bbs为论坛…

网站的目录结构为:

# tree /home/wwwroot/landui.com

/home/wwwroot/landui.com

├── bbs

│   └── index.html

└── www

    └── index.html

2 directories, 2 files

/home/wwwroot/landui.com为nginx的安装目录下默认的存放源代码的路径。

bbs为论坛程序源代码路径;www为主页程序源代码路径;把相应程序放入上面的路径通过;http://www.landui.com 访问的就是主页http://www.landui.com 访问的就是论坛,其它二级域名类推。

有2种方法,推荐方法一

方法一:

server {

listen 80;

server_name ~^(?<subdomain>.+).landui.com$;

access_log /data/wwwlogs/landui.com_nginx.log combined;

index index.html index.htm index.php;

root /home/wwwroot/landui/$subdomain/;

location ~ .php$ {

    fastcgi_pass unix:/dev/shm/php-cgi.sock;

    fastcgi_index index.php;

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    include fastcgi_params;

    }

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {

    expires 30d;

    }

location ~ .*\.(js|css)?$ {

    expires 7d;

    }

}

方法二:

server {

listen 80;

server_name *.landui.com;

access_log /home/wwwlogs/landui.com_nginx.log combined;

index index.html index.htm index.php;

if ($host ~* ^([^\.]+)\.([^\.]+\.[^\.]+)$) {

    set $subdomain $1;

    set $domain $2;

}

location / {

    root /home/wwwroot/landui.com/$subdomain/;

    index index.php index.html index.htm;

}

location ~ .php$ {

    fastcgi_pass unix:/dev/shm/php-cgi.sock;

    fastcgi_index index.php;

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    include fastcgi_params;

    }

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {

    expires 30d;

    }

location ~ .*\.(js|css)?$ {

    expires 7d;

    }

}

另外: 如果是根据二级名称 分发到不同服务上

若是通配: *.xxxx.com 则需要配置 二级域名的名称获取:

 set $subdomain '';if ($host ~* ^(.*?)\.mydomain.net) {set $subdomain $1;}

然后根据名称 方发到不同的服务:

# subdomain的值是根据二级域名正则匹配出来的
    if ($subdomain ~* ^(bi|cd|doc)$) {
        # 当subdomain匹配app1、app2或app3时,执行以下操作
        proxy_pass http://192.1.4.6:8080;
    }
    if ($subdomain = git) {
        proxy_pass http://192.1.4.7:8080;
    }

http://www.hengruixuexiao.com/news/21039.html

相关文章:

  • wordpress上传权限设置整站优化推广
  • ie打不开建设企业网站找营销推广团队
  • wordpress电影站模版搜狗网页搜索
  • json做网站seo软件优化工具软件
  • 做微信公众号微网站吗网站制作的流程
  • 网站开发及后期维护怎样在百度上做广告
  • 独立做网站需要学什么条件谷歌广告推广网站
  • 个人工商户做网站备案北京整站线上推广优化
  • 杭州微信网站建设怎么创建一个网址
  • 山东德州最大的网站建设教学百度关键词多少钱一个月
  • 网站开发入门新冠疫情最新情况
  • 对网站建设过程新媒体营销方式有几种
  • 美女做暖暖视频的网站青岛seo网站管理
  • 基于asp的网站设计与实现百度怎么推广自己的视频
  • 小江高端企业网站建设游戏推广接单平台
  • 长治一般做一个网站需要多少钱百度seo原理
  • 网站制作中企动力网站如何让百度收录
  • 网站建设与维护是什么内容?搜索软件
  • 手机网站建设推荐seo优化教程
  • 想开个网站卖衣服的怎么做网络推广学校
  • 网站建设公司西安网络服务商在哪咨询
  • 河东做网站的公司seo还可以做哪些推广
  • 西宁哪家网络公司做网站好seo关键词首页排名代发
  • 可以做区位分析的网站个人模板建站
  • 做网站广告艾滋病阻断药
  • 建设网站网络公司seo模拟点击工具
  • 网站建设作业谷歌网页版入口
  • 门户网站和部门网站的区别网络兼职平台
  • 柳州做网站优化百度官方客户端
  • 网站开发做账中国网评中国网评