Forum archive
LAMP Server always pulls up the Control Panel.
I just installed a new turnkey LAMP server, and everything seems to be working great. However the Control Panel page comes up whenever I try to browse to my domain, no matter what I do.
I moved the contents to the /var/www folder (containing the Turnkey LAMP Control Panel) into subfolder (lets call it admin.mysite,com) and I dumped my website into the /var/www/www.mysite,com folder, and setup the Apache virtual hosts for each. I also placed a simle index.html file in /var/www for testing purposes. I the directory looks like this:
/var/www/admin.mysite,com /var/www/www.mysite,com /var/www/index.html
Apache is set for www.mysite,com to respond to any address on any port. admin.mysite,com is ony supposed to respond to admin.mysite,com on any port.
Here are the conf files generated my webmin
<VirtualHost *> DocumentRoot /var/www/www.mysite,com <Directory "/var/www/www.mysite,com"> allow from all Options +Indexes </Directory> </VirtualHost>
<VirtualHost admin.mysite,com:*> DocumentRoot /var/www/admin.mysite,com </VirtualHost>
I am most likely missing something really basic here, but no matter how I set it up, the Control Panel always shows up when I go to www.mysite,com, even when I tell the admin.mysite,com to only listen to a specific port. The only way I have been able to access anything other then the control panel is to remove the files compleatly.
In short; I would like to serve out my own website, with the Control Panel only accessable via a sub domain. How can I accomplish this?
BTW, I had to replace the . in the urls with a , to get around the spam filter. I guess it thought I was posting links or something. Sorry if it looks weird.
For Apache to use an updated config (e.g. like adjusting virtual hosts) you need to at least reload Apache.
or