Hi,

I am a very beginner and have been told to sort this out for my company as the person that created the system has gone into the military.

We currently have one domain with many sub-domains which is forwarded from domain company A to our Linux server which then deals with the correct folder and website to display. Also, one domain is a https which gets sent to a windows server.

We now have a second domain name with a second domain company and will be forwarded to the same Linux Server. The two domains only differ with .com and .fr .

In Linux or apache how do I send traffic for this new domain and sub-domains including the one to the windows server to there own totally separate folders.

I really need step by step simple instructions as I have never really used Linux or Apache before.

Any help would be greatly appreciated as I do not know where to start.

Nigel

What you'll need is virtual hosts. They're added to the Apache configuration file (usually httpd.conf), and you can specify what domain/subdomain to use, and which folder to display. For more information, check out the Apache documentation, or check out this article on Devshed about virtual hosts.

Hope this helps

I have found the httpd.conf file and copied one of the virtual hosts that was there but changed the .com to .fr. It still points to the same files so it should work when I type the url but show the existing website.

When I type the URL it just shows TEST. I have pinged the url and it goes to our ip address.

Do I have to re-start the apache server and how do I do that in Linux

Thanks

Nigel

Do I have to re-start the apache server and how do I do that in Linux

Yes, you'll have to restart the Apache server after any changes to httpd.conf. You have 2 options:

  • Restarting the entire machine, which is more complete and should be done if you're having problems with the server, etc..
  • Restarting just the Apache service. To do this, you usually run /etc/init.d/apache2 restart with root privalges on the command line. You can also replace restart with start if Apache isn't already running, and stop to completely halt the service.

Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.