Apache virtualhost setting always fail after reboot
<virtualhost 123.45.67.89:80="">ServerAdmin admin@mysite.com
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /srv/www/mysite.com/public_html
ErrorLog /srv/www/mysite.com/logs/error.log
CustomLog /srv/www/mysite.com/logs/access.log combined</virtualhost>
And the I disabled the default virtualhost and enable mine:
a2dissite default
a2ensite mysite.com
Reload:
/etc/init.d/apache2 reload
My /etc/hosts is as follow:
127.0.0.1 localhost.localdomain localhost
123.45.67.89 myhost.mysite.com myhost
And then I tested by accessing
The problem is, everytime I reboot my box, I can no longer access my site anymore.
Doesn't work with
The only way I can make it work again is by issuing /etc/init.d/apache2 reload everytime after rebooting.
This happens all time time everytime I reboot (tried it multiple times in the past 2 days).
Any suggestions?
Thanks in advance.
1 Reply
/etc/apache2/htdocs
Which is incorrect since the document root is specified somewhere else.
I tried enabling the 'default' virtual host but it didn't seem to help.
I search everywhere in case there is a config file somewhere using /etc/apache2/htdocs. Nothing found.
Anyone?