LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   VIrtual host (https://www.linuxquestions.org/questions/linux-general-1/virtual-host-27102/)

thep 08-03-2002 06:26 AM

VIrtual host
 
HI, i got a question.

i saw some web site look like this
http://httpd.apache.org/

is that called virtual host? (httpd)

if yes, how can i set it?
if i want to work it on LAN

<VirtualHost 192.168.1.254>
ServerAdmin webmaster@ultimo
DocumentRoot /home/thep/www/
ServerName host.ultimo
ErrorLog logs/host.thep.ultimo-error_log
TransferLog logs/host.thep.ultimo-access_log
</VirtualHost>


i set ti like that but not work

anyone know how to set?
thank you
:Pengy:

MartBrooks 08-03-2002 07:24 AM

Have you enabled named virtual hosts in the configuration file?

Regards

thep 08-03-2002 08:23 AM

WHere it is?

can u tell me?

thep 08-03-2002 08:25 AM

another thing is i can have 2 websites in 1 IP already
do i have to enable it ?

MartBrooks 08-03-2002 08:40 AM

Try here:

http://www.cfdev.com/apache/virtualhosts.cfm

Regards

naz 08-03-2002 08:42 AM

All the documentation that you'll need is here:

http://httpd.apache.org/docs/vhosts/index.html

I recommend that you get the book Professional Apache published by Wrox Press - this is an excellent Apache resource collected into a handy dead tree format - it's certainly easier to decode than the existing online documentation.

naz

Jazm 08-03-2002 12:47 PM

I believe you'll at least need to include the proxy module in the apache compile. I don't thing it's there by default. Compile from src and use --enable-mod=proxy during the configure stage. You also might consider --enable-share=max

thep 08-03-2002 08:33 PM

now i'm using Dynamic DNS, at no-ip.org

i can use virtual host now, but i have to enable wildcard there.
so it's working.

i still got a question that, why it not work in LAN.

for example it set server name is "myserver", when i type "myserver" at browser it display webpage on server.

but when i set vitual host already,

############################### MAIN
NameVirtualHost *

<VirtualHost *>
ServerName ttt.myftp.org
DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost *>
ServerName ttt.no-ip.org
DocumentRoot /home/thep/www
</VirtualHost>

<VirtualHost *>
ServerName 192.168.1.254
DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost *>
ServerName ultimo
DocumentRoot /var/www/html
</VirtualHost>


################################ VIRTUAL
<VirtualHost *>
ServerName www.ttt.no-ip.org
ServerAlias www.ttt.no-ip.org #IT"S WORKING
DocumentRoot /home/thep/www
DirectoryIndex index.cfm index.htm index.html
</VirtualHost>

<VirtualHost *>
ServerName www.tttno-ip.org
ServerAlias virtual.ttt.no-ip.org #IT"S WORKING
DocumentRoot /home/ting/www
DirectoryIndex index.cfm index.htm index.html
</VirtualHost>


<VirtualHost *>
ServerName ultimo
ServerAlias me.ultimo #### NOT WORKING
DocumentRoot /home/me/www
DirectoryIndex index.cfm index.htm index.html
</VirtualHost>


when i use server name from my server, it's not working
do i have to set anything ???


thank you

rverlander 08-03-2002 09:13 PM

Quote:

Originally posted by Jazm
I believe you'll at least need to include the proxy module in the apache compile. I don't thing it's there by default. Compile from src and use --enable-mod=proxy during the configure stage. You also might consider --enable-share=max
IF YOU COMPILE WITH PROXY THEN YOUR SERVER IS A PROXY SERVER


Also remove the .cfm unless you use Macromedia Windows 2000 ColdFusion 5.0:p

naz 08-06-2002 10:43 AM

Quote:

ServerName ultimo
ServerAlias me.ultimo
You actually have to have these hostnames resolvable by the client computer (the computer you're surfing from) - either put entries into the hosts (or hosts.ini) file or set up your dns to resolve these.

naz

Syncrm 08-06-2002 11:28 AM

i've been trying to get virtual hosts working for quite awhile. would be very interested if anyone got them to work. :-)


All times are GMT -5. The time now is 09:00 AM.