问题是无法运行网站。
http://192.168.188.150/ 这个VM上只有两个网站,之前可以页面转跳,现在用了Nginx Proxy manager 去反向代理。
我要迁移网站到一个新的服务器,我复制了所有的配置文件,但只能访问主页(重定向到登录页面),登录功能不起作用,如果我刷新页面 会出现“404 Not Found”。
据我了解,Node.js 里需要告诉 Apache build 文件夹在哪里,但是该网站之前没有安装 gulp 和 build 文件夹,并且仍然使用 forever 或 pm2 运行。
这是之前的开发人员编写的自述文件,
英文机翻的
网络客户端
AngularJS v1 单页 Web 应用程序。
Javascript 源代码是用 Coffeescript 编写的,并与 Browserify 一起打包。
开发设置
构建任务和大多数应用程序依赖项由 NPM 管理。
一些依赖项由 Bower 管理,但它是一个 hack,构建任务处理实际的 Bower 包安装。 Bower 必须 > 局部安装
从客户端目录运行 npm i --dev 以安装包依赖项。
使用 Node.js v0.12 测试
构建任务
Gulp 任务运行器用于构建任务。 Gulp 应该使用 npm i -g gulp 全局安装。
任务应该从客户端目录运行。
任务在 client/gulp/tasks 目录中定义。
gulp build 为开发而编译。
gulp 生产:构建以编译生产。生产版本不 > 包含源映射。
gulp revision 运行 production:build 然后将修订资产散列到 clean > wwwRevisioned 目录中。
这是原版
Web client
AngularJS v1 single-page web application.
Javascript source is written in Coffeescript and packaged with Browserify.
Development setup
Build tasks and most application dependencies are managed with NPM.
Some dependencies are managed by Bower but it's a hack and the build tasks handle actual Bower package installations. Bower must be >installed lobally
Run npm i --dev from the client directory to install package dependencies.
Tested with Node.js v0.12
Build tasks
Gulp task runner is used for build tasks. Gulp should be installed globally with npm i -g gulp .
Tasks should be run from the client directory.
Tasks are defined in the client/gulp/tasks directory.
gulp build to compile for development.
gulp production: build to compile for production. Production build does not >include sourcemaps.
gulp revision to runs production:build then hash revisions assets into clean > wwwRevisioned directory.
你这个是重定向问题,你看下,或者404 直接重定向一个前端存在的地址就行啦
1.检查一下web的路由,以及伪静态问题。
2.检查一下web服务是否没有安装正确。
网站后台都有数据库的,你只拷贝了网站没有迁移数据库,你的网站一访问数据库就报错,可不是除了登录页哪都去不了吗
有点像是路径或是参数设置不一样导致的;也就是我们安装包的位置和引用的位置不对应,那么就需要重新配置你的环境变量了
1、在我的电脑-->属性-->高级系统设置-->环境变量;在用户变量中的Path点击编辑添加你的Node环境变量(根据自己Node的文件路径添加)
2、在系统变量中:新建一个NODE_PATH如下(同样的路径也是自己安装的路径)
3、最后在系统变量path中添加