[英]How can i run an angular 6 application in wamp?
我有一个 angular 6 应用程序,我想在 Apache 服务器上安装它,这可能吗? 我不想安装 ngix。 是否可以在 Apache 服务器上运行该应用程序?
如果您必须部署 Angular 应用程序,您可以按照此链接的说明进行操作:
' https://angular.io/guide/deployment '
只需使用 'ng build' 构建项目,然后将 './dist/' 中的文件夹复制到 apache 服务器 www 目录中的项目名称。
您肯定可以使用 Apache 为您的应用程序提供服务。
您需要根据您的 Angular 应用程序目录配置您的 DocumentRoot。
此外,您需要像下面这样配置 ReWriteEngine:
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html
点击链接了解更多详情: https : //angular.io/guide/deployment
谢谢你,普尼特
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.