我有Route 53configuration转发
client1.mydomain.com ALIAS -> eb.crypticaddress.com.
这按预期工作。 现在我已经在Elastic Beanstalk中重写了Apache Config。
在EB实例中,我有一个运行的NodeJS提供了一个API,但也将静态网站内容作为静态HTML和JQuery提供。
app.js
app.use(express.static(path.join(__dirname, 'website')));
静态文件夹
网站/客户端1网站/客户端2网站/客户端3
我怎么把这个连接起来
client1.mydomain.com被转发到website/client1文件夹等等?
我已经在项目的.ebextensions文件夹中有了这个nginx.config文件。
我在.ebextensions文件夹中使用这个:
files: "/etc/httpd/conf.d/vhost.conf": mode: "000644" owner: root group: root encoding: plain content: | NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/var/app/current/website" <Directory "/var/app/current/website"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> </VirtualHost> <VirtualHost *:80> ServerName client1.mydomain.com DocumentRoot "/var/app/current/website/client1" <Directory "/var/app/current/website/client1"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> </VirtualHost>
但是EB忽略了我的文件…