我是Mac的新手,但长期使用Ubuntu进行开发。我知道如何在Ubuntu中创建虚拟主机,但对Mac一无所知。我创建了一个hosts条目,如下所示:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost mysite.loc
255.255.255.255 broadcasthost
::1 local
我已经创建了一个节点服务器,它在某个网站上搜索,然后返回格式良好的json数据。我的本地主机上一切都很好。但是现在我想把它上传到服务器上,并获得一个返回json数据的链接(就像api一样)。
我该怎么做?
以下是代码大纲:
var express = require('express');
var fs = require('fs');
var request = require('request');
var cheerio = require('cheerio');
var app = express();
app.
阅读,有一部分是这样写的:
If no matching ServerName or ServerAlias is found in the set of virtual hosts containing the most specific matching IP address and port combination, then the first listed virtual host that matches that will be used.
我有一个包含许多虚拟主机域的vhost文件。问题是,当我键入服务器IP时,我应该转到root,但不是,正如apache文档所述,我被带到了第