优质SS/SSR/Trojan/Xray/V2Ray机场推荐 | IPLC/IEPL专线加速器梯子推荐 | 解锁奈飞Netflix/HBO/Hulu等国外流媒体
新人也许会迷惑,为什么科学上网还要建一个网站?我不会编程啊,是不是特别麻烦?
先回答第一个问题,建网站的原因有:
本文作为演示,仅仅使用了一个最简单的【单文件html页面 + Nginx】来搭建,以此完成前两个目标。对于“伪装”和“网站运营”这个目标,需要的就是各不相同、秀出真我,需要的同学可以自行搜索学习。这个内容已经完全偏离了科学上网,本文就不深入解析了。
$ sudo apt update && sudo apt install nginx
http://100.200.300.400:80
,若看到下图的界面就说明Nginx已经正常在运行了。cmd-10 | mkdir | 新建文件夹 |
cmd-11 | systemctl reload | 重新加载某个服务 |
conf-02 | /etc/nginx/nginx.conf | Nginx程序设置 |
/home/vpsadmin/www/webpage/
并建立网页文件index.html
$ mkdir -p ~/www/webpage/ && nano ~/www/webpage/index.html
ctrl+o
)退出(ctrl+x
)<html>
<!-- Text between angle brackets is an HTML tag and is not displayed.
Most tags, such as the HTML and /HTML tags that surround the contents of
a page, come in pairs; some tags, like HR, for a horizontal rule, stand
alone. Comments, such as the text you're reading, are not displayed when
the Web page is shown. The information between the HEAD and /HEAD tags is
not displayed. The information between the BODY and /BODY tags is displayed.-->
<head>
<title>Enter a title, displayed at the top of the window.</title>
</head>
<!-- The information between the BODY and /BODY tags is displayed.-->
<body>
<h1>Enter the main heading, usually the same as the title.</h1>
<p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
<ul>
<li>The first item in your list</li>
<li>The second item; <i>italicize</i> key words</li>
</ul>
<p>Improve your image by including an image. </p>
<p><img src="https://i.imgur.com/SEBww.jpg" alt="A Great HTML Resource"></p>
<p>Add a link to your favorite <a href="https://www.dummies.com/">Web site</a>.
Break up your page with a horizontal rule or two.
</p>
<hr>
<p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
<!-- And add a copyright notice.-->
<p>© Wiley Publishing, 2011</p>
</body>
</html>
nginx.conf
并重启 Nginx
服务,将80
端口的http访问定位到刚才建立的 html
页面上nginx.conf
。$ sudo nano /etc/nginx/nginx.conf
http{}
内,然后保存(ctrl+o
)退出(ctrl+x
)。(记得将域名替换为之前准备好的、包含二级域名的真实域名) server {
listen 80;
server_name 二级域名.你的域名.com;
root /home/vpsadmin/www/webpage;
index index.html;
}
nginx
重新载入配置使其生效sudo systemctl reload nginx
http://二级域名.你的域名.com
,你看到这样的页面则说明成功:至此,Xray的第一个基础设施【网页】已经就位,我们马上就进入第二个基础设施【证书】吧!
⬛⬛⬛⬛⬛⬜⬜⬜ 62.5%