Cascade Posted December 28, 2006 Share Posted December 28, 2006 First of all myself and Drace would like to thank the following people for helping us out , makeshift_theory , and Apacheguy , you have been very helpfull so far , but we need more help if you would be so kind.With your guidance we can now remotely access the server , eg the test index page is now vissible outside the lan and we also have remote FTP access , using FileZilla.Now we need to know how to create multiple sites on the server and assign them doman names and all that kind of stuff , Myself and Drace own domain names , do we need to provide any info to our domain name registrars or do we just setup virtual host , as you can tell we dont know much about this but we are getting there slowly .Also we are still running the program called WAMP , should we uninstall this and change to just apache , maybe this would be easier ??, but would it mess up any of the port settings or anything like that if we did ??.once again thank you for your time , reply to us together or seperatly it dosnt matter , eg if im not here , talk to Drace and vice versaThanksCascade Quote Link to comment Share on other sites More sharing options...
makeshift_theory Posted December 28, 2006 Share Posted December 28, 2006 First issue this command to your server as root:[code]locate httpd.conf | more[/code]That should help you locate the httpd.conf file which is the one we will be editing. I'm not to familiar with WAMP so your httpd.conf might be called something else, check your documentation. Now once you locate the file you will type the following command:[code]nano httpd.conf[/code]Then proceed to add this in the bottom of the code:[code]<VirtualHost *>ServerName www.domain1.comDocumentRoot /var/www/domain1/</Virtual><VirtualHost *>ServerName www.domain2.comDocumentRoot /var/www/domain2/</Virtual>[/code]Ok now let me explain, this is the most basic style of Virtual Hosting. It will listen on all ports for the server name www.domain1.com. When this domain is hit on the server it will search /var/www/domain1/ for the root directory aka(the index file of your website.)Just set up a virtual host setup for each domain you have and you should be golden mates. Quote Link to comment Share on other sites More sharing options...
Drace Posted December 28, 2006 Share Posted December 28, 2006 Seeing as your not familiar with WAMP (its just the prgrams grouped all the programs are as they should be, well they are so far as I know) that bit of info was pointless I know, but still one mans rubbish is another mans treasure as they say.makeshift_theory thanks for your help, your a star!!,If we encounter any problems we'll be sure to post!,Drace Quote Link to comment Share on other sites More sharing options...
makeshift_theory Posted December 28, 2006 Share Posted December 28, 2006 I use Lampp and I'm assuming they are the same thing, anywho same princibles just different file name. With lampp it's httpd-vhosts.conf and it's in the /opt/lampp/etc/extra folder I believe. Quote Link to comment Share on other sites More sharing options...
Cascade Posted December 28, 2006 Author Share Posted December 28, 2006 I Have been looking for this file and have found thisits called httpd.conf and it opens as a Text document , i found it in C:\wamp\Apache2\conf , is that it . heres what is says about Virutal Host### Section 3: Virtual Hosts## VirtualHost: If you want to maintain multiple domains/hostnames on your# machine you can setup VirtualHost containers for them. Most configurations# use only name-based virtual hosts so the server doesn't need to worry about# IP addresses. This is indicated by the asterisks in the directives below.## Please see the documentation at # <URL:http://httpd.apache.org/docs-2.0/vhosts/># for further details before you try to setup virtual hosts.## You may use the command line option '-S' to verify your virtual host# configuration.## Use name-based virtual hosting.##NameVirtualHost *:80## VirtualHost example:# Almost any Apache directive may go into a VirtualHost container.# The first VirtualHost section is used for requests without a known# server name.##<VirtualHost *:80># ServerAdmin webmaster@dummy-host.example.com# DocumentRoot /www/docs/dummy-host.example.com# ServerName dummy-host.example.com# ErrorLog logs/dummy-host.example.com-error_log# CustomLog logs/dummy-host.example.com-access_log common#</VirtualHost>any help here would be great Quote Link to comment Share on other sites More sharing options...
makeshift_theory Posted December 28, 2006 Share Posted December 28, 2006 add this at the bottom:[code]<VirtualHost *:80> DocumentRoot /www/domain1.com ServerName www.domain1.com</VirtualHost>[/code]and place all the files you want shown in the /www/domain1.com folder. Quote Link to comment Share on other sites More sharing options...
Drace Posted December 28, 2006 Share Posted December 28, 2006 Cheers Makeshift-theory...We'll let you know how it goes asap! Quote Link to comment Share on other sites More sharing options...
Drace Posted December 28, 2006 Share Posted December 28, 2006 I have my domain pointing to our server ([url=http://www.paranoiaonline.co.uk]www.paranoiaonline.co.uk[/url]), I've also added the virtual host to the http.conf file using the following code:[code]<VirtualHost *:80>DocumentRoot /wamp/www/pwd/ServerName www.paranoiaonline.co.uk</VirtualHost>[/code]However when I type my URL:([url=http://www.paranoiaonline.co.uk]www.paranoiaonline.co.uk[/url]) I get a page with the index of all the directories in the /wamp/www folder, it doesn't load the index page of the /wamp/www/pwd directory, am I missing some code or am I just being stupid?Drace Quote Link to comment Share on other sites More sharing options...
makeshift_theory Posted December 29, 2006 Share Posted December 29, 2006 Well first did you restart apache? You need to reload your configuration first. If you get no errors then you should be golden. Quote Link to comment Share on other sites More sharing options...
Drace Posted December 29, 2006 Share Posted December 29, 2006 Cheers man, I'll past the message onto Cascade to start Apache again... I'll let you know the results,Drace Quote Link to comment Share on other sites More sharing options...
Cascade Posted December 29, 2006 Author Share Posted December 29, 2006 After doing some digging , and looking through various books , should the virtual host be setup like thisheres the example from the bookNameVirtualHost 192.168.128.10Listen 192.168.128.10:80<VirtualHost 192.168.128.10>ServerName host1.example.comDocumentRoot /usr/local/apache2/htdocs/host1</VirtualHost>oviously need to change the example ip's and document roots etcAlso somewhere in the back of my mind i keep thinking that WAMP is slowing us down , i really want to get rid of it and just have Apache running or something like thatadvice would be greatthanksCascade Quote Link to comment Share on other sites More sharing options...
phrozenflame Posted December 29, 2006 Share Posted December 29, 2006 Yes it will only work when its correct and that seems correct Quote Link to comment Share on other sites More sharing options...
makeshift_theory Posted December 30, 2006 Share Posted December 30, 2006 if you use <VirtualHost *> that tells it to listen to all ports so that should be your failsafe. Quote Link to comment Share on other sites More sharing options...
Cascade Posted January 2, 2007 Author Share Posted January 2, 2007 Hey Everyone again , its been a while since ive posted , i left the server alone for a while as it was really starting to bug me not being able to get it right.I have now deiced to remove WAMP and just install Apache , i have now done this and need to know where to begin , i know it sounds like im asking the same questions again but im just trying a fresh startthanksCascade Quote Link to comment Share on other sites More sharing options...
makeshift_theory Posted January 2, 2007 Share Posted January 2, 2007 check out the www.howtoforge.com they have a lot of good server related material. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.