[SOLVED] Virtual Host
Posted: Mon Mar 30, 2015 10:52 pm
I successfully configure a new domain to point at my sub-domain app.mydomain.com
Now I wish to have the main root folder set to: /home/admin/web/app.mydomain.com/public_html/public
And not to: /home/admin/web/app.mydomain.com/public_html/public
I try to do so by changing the Virtual Host in the Apache2 config (/etc/apache2/sites-available/app.mydomain.com.conf) as follow:
And run:
And finally restart Apache.
But it does not work. I suspect Vesta to override the conf file somewhere.
I am far to be a DNS specialist and I guess there is a better way to achieve what I want. Maybe by adding a record to the domain app.mydomain.com?
Any good idea is welcome. Thanks
Now I wish to have the main root folder set to: /home/admin/web/app.mydomain.com/public_html/public
And not to: /home/admin/web/app.mydomain.com/public_html/public
I try to do so by changing the Virtual Host in the Apache2 config (/etc/apache2/sites-available/app.mydomain.com.conf) as follow:
Code: Select all
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mydomain.com
ServerAlias app.mydomain.com
DocumentRoot /home/admin/web/app.mydomain.com/public_html/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Code: Select all
a2ensite app.mydomain.com.conf
But it does not work. I suspect Vesta to override the conf file somewhere.
I am far to be a DNS specialist and I guess there is a better way to achieve what I want. Maybe by adding a record to the domain app.mydomain.com?
Any good idea is welcome. Thanks