记录部署静态页面
coconutnut

把index.html和assets准备好

ssh连上服务器

1
sudo apt-get install apache2

把文件传到/var/www/html

(一开始传成了/root/var/www/html,index.html一直显示不对)

1
vim /etc/apache2/apache2.conf

最后加一句

1
ServerName ***.**.**.89

然后

1
vim /etc/apache2/mods-available/dir.conf

改成

1
2
3
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>

重启

1
sudo apache2ctl -k restart

浏览器访问

http://xxx/index.html

ok