永久黄网站色视频免费直播,yy6080三理论日本中文,亚洲无码免费在线观看视频,欧美日韩精品一区二区在线播放
標(biāo)題:
[求助]
nginx下如何綁定二級(jí)域名到子目錄?
[打印本頁]
作者:
paya
時(shí)間:
2012-3-11 12:33
標(biāo)題:
nginx下如何綁定二級(jí)域名到子目錄?
用wdcp建站時(shí),會(huì)自動(dòng)生public_html目錄。這個(gè)目錄下面有三個(gè)子目錄,分別是a,b,c,目前想讓a.***.com綁定a子目錄,b,c也類似設(shè)置,請(qǐng)問要如何設(shè)置?
查了許多資料,說是要改.conf 文件,在文件管理里點(diǎn)
nginx,也找到文件,但不知道應(yīng)該添加什么。
感謝。
server {
listen 80;
server_name ***.com www.***.com *.***.com;
root /mnt/sdb1/web/bbq/public_html;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
error_page 405 /errpage/405.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1d;
}
location ~ .*\.(js|css|html|htm)?$ {
expires 12h;
}
}
復(fù)制代碼
作者:
paya
時(shí)間:
2012-3-11 12:39
定義兩個(gè)不同的server分別指定不同的目錄
是這么弄嗎?我嘗試一下。
作者:
paya
時(shí)間:
2012-3-11 12:41
沒想到,自己研究成功了,感謝度娘。
作者:
paya
時(shí)間:
2012-3-11 12:49
象下面這樣設(shè)置是不是不對(duì)?
server {
listen 80;
server_name ***.com www.***.com *.***.com;
root /mnt/sdb1/web/bbq/public_html;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
error_page 405 /errpage/405.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1d;
}
location ~ .*\.(js|css|html|htm)?$ {
expires 12h;
}
}
server {
listen 80;
server_name bbs.***.com;
root /mnt/sdb1/web/bbq/public_html/bbs;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
error_page 405 /errpage/405.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1d;
}
location ~ .*\.(js|css|html|htm)?$ {
expires 12h;
}
}
復(fù)制代碼
作者:
paya
時(shí)間:
2012-3-11 22:12
其實(shí)面板上面就可以綁定的,暈。
放松一下,果然還是有好處的。
作者:
admin
時(shí)間:
2012-3-11 22:34
現(xiàn)在才發(fā)現(xiàn)?呵呵
歡迎光臨 WDlinux官方論壇 (http://www.fsowen.com/bbs/)
Powered by Discuz! 7.2