Jump to content
The Uniform Server Community

How to configure virtual host


hawkesley
 Share

Recommended Posts

i need to access 3 domains on my server.

I went through the following set up but niether the localhost or the websites were located.

Where have I gone wrong?

Set up steps.

I have set the dns to point at the server as follows

www.e-books4u.net / ip address 217.49.159.226

and so on for the other 2.

In my www folder I have set up 3 sub folders with the files in them named as follows

e-books4u

catering4cash

hawkesley

I have modified the conf file as follows

 

NameVirtualHost *

 

# 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 *>

# 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>

 

<VirtualHost *>

ServerName www.e-books4u.net

DocumentRoot/www/e-books4u

</VirtualHost>

 

<VirtualHost *>

ServerName www.catering4cash.com

DocumentRoot/www/catering4cash

</VirtualHost>

 

<VirtualHost *>

ServerName www.hawkesleypublishingsolutions.com

DocumentRoot/www/hawkesley

</VirtualHost>

 

NameVirtualHost *

<VirtualHost *>

ServerName localhost:80

DocumentRoot /www

</VirtualHost>

 

I stopped and restarted the apache server, not the machine.

Link to comment
Share on other sites

:)

i need to access 3 domains on my server.

I went through the following set up but niether the localhost or the websites were located.

Where have I gone wrong?

Set up steps.

I have set the dns to point at the server as follows

www.e-books4u.net / ip address 217.49.159.226

and so on for the other 2.

In my www folder I have set up 3 sub folders with the files in them named as follows

e-books4u

catering4cash

hawkesley

I have modified the conf file as follows

 

NameVirtualHost *

 

# 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 *>

# 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>

 

<VirtualHost *>

ServerName www.e-books4u.net

DocumentRoot/www/e-books4u

</VirtualHost>

 

<VirtualHost *>

ServerName www.catering4cash.com

DocumentRoot/www/catering4cash

</VirtualHost>

 

<VirtualHost *>

ServerName www.hawkesleypublishingsolutions.com

DocumentRoot/www/hawkesley

</VirtualHost>

 

NameVirtualHost *

<VirtualHost *>

ServerName localhost:80

DocumentRoot /www

</VirtualHost>

 

I stopped and restarted the apache server, not the machine.

 

 

I have solved the problem by using the apanelto create the virtual hosts and all seems well.

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...