nginx多域名设置,多子目录,共用一端口

nginx多域名设置,多子目录,公用一端口

 


前段时间自己买了一个80G的服务器,所以想把原来的网站都整合到这台服务器上面,现在在服务器上绑定了五个域名。

下面是对nginx配置文件的设置。

五个域名公用一个端口,80端口,在内部设置子目录。

server {
listen 80;
server_name www.china7s.com;
root /home/ftp/china7s;

location / {
index index.html index.htm index.shtml index.php default.php;
}

#access_log /dev/null lu_access_log_2;

error_page 404 /404.html;

location ~ \.php$ {
fastcgi_pass 127.0.