Jump to content

Virtual Hosts , Domain Names and Thanks


Cascade

Recommended Posts

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 versa

Thanks
Cascade
Link to comment
Share on other sites

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.com
DocumentRoot /var/www/domain1/
</Virtual>

<VirtualHost *>
ServerName www.domain2.com
DocumentRoot /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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

I Have been looking for this file and have found this

its 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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

After doing some digging , and looking through various books  , should the virtual host be setup like this
heres the example from the book

NameVirtualHost 192.168.128.10
Listen 192.168.128.10:80

<VirtualHost 192.168.128.10>
ServerName host1.example.com
DocumentRoot /usr/local/apache2/htdocs/host1
</VirtualHost>

oviously need to change the example ip's and document roots etc

Also 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 that

advice would be great
thanks
Cascade
Link to comment
Share on other sites

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 start

thanks
Cascade
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.