【发布时间】:2020-06-16 00:58:06
【问题描述】:
下面是我的配置文件
server {
listen 80 default_server;
server_name _;
root /var/www/html;
index index.html index.htm;
location /test1/ {
alias /var/www/html/test1;
try_files $uri /index.html;}
location /test2/ {
alias /var/www/html/test2;
try_files $uri /index.html;}}
如果有人帮我解决这个问题 为此,我在网络浏览器中收到 404 错误。
【问题讨论】:
-
两个独立的网站,还是一个有两个子文件夹的网站? site.com/test1/ & dite.com/test2/ ?
-
一个 ip 和两个网站,如localhost/test1 & localhost/test2