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?