virtual name based hosting
i have a ubuntu 9.04 server setup with apache2. i setup a virtual domain using the ispconfig 3 control panel. i set the domain to point towards my server. when i type in the domain however it goes to the servers default index page instead of the virtual hosts root folder. how do i fix this?
thanks, -kevin |
Hi Kevin,
It would appear that Apache is unable to find a matching <VirtualHost> section in your apache config and is serving the default. ssh to your server and run Code:
apache2ctl configtest If that command fails to run( im not a Ubuntu user ) try just restarting apache whilst watching the apache logs with Code:
tail -f /var/log/apache2/* It would help greatly if you post any errors and the <VirtualHost> section of your apache config for the one domain. Something like Code:
<VirtualHost *:80> |
when i ran:
Code:
apache2ctl configtest Code:
[Mon Jun 15 23:26:40 2009] [warn] NameVirtualHost 70.128.229.130:80 has no VirtualHosts in my apache2.conf file it doesnt have the virtual host config in it. at the end of the config file it has Code:
# Include the virtual host configurations: Code:
<Directory /var/www/uvbnserved.com> Code:
tail -f /var/log/apache2/* Code:
root@uvbnserved:/home/kevin# tail -f /var/log/apache2/* i'm just a kid trying to learn how to do this stuff so help from this wonderful community is really appreciated |
Sorry I don't have a ubuntu/debian or ispconfig 3 server handy but I think I had this hassle once before on a Ubuntu box.
From memory it was easy to fix. Try this Code:
a2dissite default && /etc/init.d/apache2 restart Good luck with the learning to run a hosting company. |
when i ran that command i got
Code:
root@uvbnserved:/home/kevin# a2dissite default && /etc/init.d/apache2 restart just checked it..it worked. i really cant thank you enough. however i added the .net version of my domain to a different virtual host but it goes to the root directory of the original virtual host i created. ihate to trouble you with more questions but i dont get why the first one works but this one doesnt |
I think seeing as you are running ISPconfig you are probably better off asking this question on the ISPConfig forums as each 'control panel' expects apache to be set up slightly differently.
It's worth reading up some Apache docs to do with vhosting in particular name based vhosting i think you have a mix of IP based vhosts and name based vhosts and thats where the problem is. Good luck in your venture. |
i have asked on the ispconfig forums. the reason i have also asked here is because linux questions is much more responsive. and atleast here i have managed to get one virtual host up. thanks for all the help ill look into it.
|
is there anyway to keep the default website working and the other virtual hosts?
|
Virtual hosts ispconfig3
Quote:
I have no problems with virtual host set up. what i learned is. Set up isp3. -add your self as a "client" if you will have some websites hosted that you own.(it will make managing another stuff more "douh") -add all your domains that you own using the "sites" tab(including the one that you wont to use for the server isp3 it self) -to access the default site for the server use the IP -or use the default created by th "site" tab in client like environment -same apply to ssh accounts and access -create mail accounts for all your domains.If you would like to forward catch all to external email like google: create mail box and uncheck the "receive mail" option.If you do not uncheck it it will create mail box and forwarding can not be set up with mail box enabled. create "forwarding" using the above email address from mailbox create "catch all" using the above email address -create ssh accounts -ftp account be aware that if you test forwarding with or without catchall you have to use email that is not the forwarding destination email to test the configuration . If you do use the destination for testing the email will never arrive a back at the source=destination making you bang your head on the wall and create flat spot on your scull like mine have. If there is way to make this statement false let me know. When creating ftp and ssh accounts is good practice to have original user names used.I create user names that describe the site i try to connect to: [client]ssh_example_net [client]ssh_example_com [client]>will be replaced with your user name you used on your "client"registration. If you did not create your self as "client" word "default" will be used. so you will end up wit defaultssh_example_net as user name. I use the same practice on ftp accounts. If you enable jail in ssh it will create folder in the client directory.The folder will be named after the user name.And your log in will take you straight in to this directory. From there you can recursively cd to any parent dir on server. To use server admin ssh,ssh in by using the IP and admin user name and password. SSL win not work with name based virtual hosts.Only one host will be able to use ssl. SSL got to have dedicated ip per host to work out of the box. there is way to make ssl work with virtual name based hosts. I'm researching right now what is the best implementation of this with isp3 with out digging too much in the set up and braking ispconfig3 stuff.Any one got some comments on that let me know. So far so good. I love to use vmware server to set up my servers.Easy backup.When i mes up just restore the last working set up an try again. |
All times are GMT -5. The time now is 09:14 PM. |