Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed May 04, 2011 5:40 am 
Offline
Senior Newbie

Joined: Tue May 03, 2011 8:31 am
Posts: 5
Just setup an apache webserver with the following virtualhost:

Code:
<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:

Code:
127.0.0.1   localhost.localdomain   localhost
123.45.67.89   myhost.mysite.com   myhost


And then I tested by accessing http://mysite.com and http://www.mysite.com, everything works fine.


The problem is, everytime I reboot my box, I can no longer access my site anymore.
Doesn't work with http://mysite.com and http://www.mysite.com.

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.


Top
   
 Post subject:
PostPosted: Wed May 04, 2011 7:53 am 
Offline
Senior Newbie

Joined: Tue May 03, 2011 8:31 am
Posts: 5
Did some fiddling around. It seems that after reboot, apache always look for files in (according the the log):

/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?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group