bfwsoa中同一个目录下如何进行多域名解析

在apache中或nginx中,如果要新建一个站点,需要修改配置文件
apache的为
<VirtualHost *:80>
ServerName www.bfw.wiki#表示要访问的域名
DocumentRoot /data/wwwroot/bfw#网站的地址
<Directory "/data/wwwroot/bfw">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Order deny,allow
allow from all
</Directory>
</VirtualHost>
nginx为
server {
listen 80;
server_name www.bfw.wiki;
#access_log logs/host.access.log main;
location / {
root /data/wwwroot/bfw/;#向配哪里配哪里,后面一致就好了
index index.html index.php 1.php 1.html;
}
error_page 500 502 503 504 /50x.html;#错误页面
location = /50x.html {
#错误页面路径
root /data/wwwroot/bfw/;#这个一般不会改,除非你觉得自己写的的比较好看
...点击查看剩余70%
网友评论0