Solved

name in virtual hosts

Posted on 2014-03-03
3
231 Views
Last Modified: 2014-03-05
Hi,

I have the following code in /etc/apache2/sites-available/testSite


NameVirtualHost 10.123.108.80

<VirtualHost 10.123.108.80>
       DocumentRoot /var/www/turnos
        ServerAdmin webmaster@localhost
        ServerAlias www.test.com
        ServerName test.com
</VirtualHost>

When i enter the ip all works well, go directly to the turnos folder, but how I can make the alias and server name to work?
0
Comment
Question by:joyacv2
3 Comments
 
LVL 31

Accepted Solution

by:
Frosty555 earned 500 total points
Comment Utility
Do you have DNS records configured for "www.test.com" and "test.com" so that it resolves to your server's IP address?

Also if you server is behind a router, and you are accessing it from your external WAN IP address, you may need to change the configuration so that it will work for any IP address instead of just the 10.123.108.80. E.g.:

NameVirtualHost *:80

<VirtualHost *:80>
       DocumentRoot /var/www/turnos
        ServerAdmin webmaster@localhost
        ServerAlias www.test.com
        ServerName test.com
</VirtualHost>

Open in new window

0
 
LVL 1

Author Comment

by:joyacv2
Comment Utility
Hi,

Is internal network, how i configure the dns records?
0
 
LVL 13

Expert Comment

by:Sandy
Comment Utility
create a local dns and use it around the network.

TY/SA
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now