web站点部署(修改)
abc这个web站点不用了,改为fditor的站点:
先把fditor.zip解压到/nginx/html目录,然后在/etc/nginx/conf.d这个目录里修改cloud.conf这个文件,把之前abc站点的端口如端口8001
对应的root配置改成fditor的目录地址/nginx/html/fditor,保存后执行nginx -s reload
原项目在中联或阿里云环境,访问地址为abc.com
现在部署到了京东云上,地址为113.77.175.65
将域名abc.com解析到113.77.175.65,:
京东云上,需要在目录C:\Windows\System32\drivers\etc下,hosts文件中加入113.77.175.65
然后,再次访问oppn.com地址即是访问的京东云环境的项目系统,
如果想测中联或阿里云原环境的项目系统,将host文件中加入信息前面加入一个#号注释掉即可
部署web前端页面
操作步骤:
1、前端程序包testadmin.zip,拷贝到/data/nginx/html/,然后解压(unzip testadmin.zip)
解压后的目录是:/data/nginx/html/testadmin/
2、安装nginx
3、在Nginx的安装目录,如/etc/nginx/conf.d这个目录里新增个.conf的文件,如新增testadmin.conf这个文件,
vi testadmin.conf文件内容输入:
server {
listen 10030;
server_name _;
location / {
root /data/nginx/html/testadmin/; #这个是前端包解压后的目录
index index.html index.htm;
try_files $uri $uri/ /index.html; # 关键配置
}
}
4、最后保存后执行:nginx -s reload
5、访问地址:ip:10030
浙公网安备 33010602011771号