0

I run an AWS ElasicBeanstalk Apache server. There is a subdomain with a different DocumentRoot (see below). When I use eb deploy and then ssh into the machine to manually change the /etc/http/conf/httpd.conf file, everything works just fine.

If however I do eb deploy again, the DocumentRoot in the http.conf file changes from "/var/www/html/sub/" to "/var/www/html/", the rest of the file remains unchanged.

I suppose eb deploy must somehow rewrite the httpd.conf file, but I am puzzled as to why only the document root changes.

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot "/var/www/html/"
</VirtualHost>

<VirtualHost *:80>
    ServerName sub.example.com
    DocumentRoot "/var/www/html/sub/"
</VirtualHost>

Does anyone have a clue how I can get my subdomains working?

mo_st
  • 39
  • 5

1 Answers1

0

AWS Elastic Beanstalk overrides manual configurations upon deployments. Ebextensions helps to load custom changes to eb environments.

Naveen
  • 61
  • 7