nuxt.js 基于node 做一个vue的服务器端渲染
nginx 静态服务器 安装步骤
环境配置
yum install gcc-c++
yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install -y openssl openssl-devel
- mkdir ruanjian
- cd ruanjian
- wget -c https://nginx.org/download/nginx-1.10.1.tar.gz
- tar -zxvf nginx-1.10.1.tar.gz
- cd nginx-1.10.1
- ./configure 写入安装配置 ./configure --with-http_ssl_module
- make 预安装
- make install
- whereis nginx 查看 nginx 安装路径 /usr/local/nginx
- cd /usr/local/nginx/sbin/ 启动
- ./nginx
查看进程
ps aux|grep nginx
ps -ef | grep nginx
kill -9 nginx
netstat -ntlp | grep :80
-
./nginx -s reload
-
配置环境变量
vim /etc/profile
export PATH=/usr/local/nginx/sbin:$PATH
source /etc/profile
nginx -s reload
- 配置代理 修改配置文件 nginx.conf
cd /usr/local/nginx/conf
vim nginx.conf
location /vue {
proxy_pass http://0.0.0.0:1901;
}
location /api{
proxy_pass http://0.0.0.0:3333;
}
nginx -s reload
http://47.104.209.44:80
/vue/login ==> http://47.104.209.44:80/vue/login
/vue ===> http://47.104.209.44:1901/
/vue/login ==> http://47.104.209.44:1901/vue/login
nginx
http 转 https
the “ssl” parameter requires ngx_http_ssl_module
https://blog.csdn.net/chanlingmai5374/article/details/81217330