Operating System - Linux
1753599 Members
6084 Online
108796 Solutions
New Discussion юеВ

Re: setup a virtual server by Apache 1.3.27

 
SOLVED
Go to solution
'chris'
Super Advisor

setup a virtual server by Apache 1.3.27

hi

I have Apache 1.3.27 installed on linux SUSE 8.2
for our Intranet http://intranet.domain.net
with default Document Root directory:
/srv/www/htdocs

Howto setup additionally a virtual webserver
for example http://test.intranet.domain.net
or http://intranet.domain.net/test

but with other (different) Document Root directory:
/home/user/public_html

regards
chris



6 REPLIES 6
Joseph Loo
Honored Contributor

Re: setup a virtual server by Apache 1.3.27

hi,

please refer to this article:

http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_20878070.html

it seems as though u r looking at reverse proxy?

regards.
what you do not see does not mean you should not believe
KapilRaj
Honored Contributor
Solution

Re: setup a virtual server by Apache 1.3.27

Steps ..

1. Add a DNS alias called "test.intranet.domain.net" CNAME to "intranet.domain.net"

2. Add the following lines in httpd.conf of the running apache,



ServerName test.intranet.domain.net
ServerAlias test.intranet.domain.net
DocumentRoot /home/user/public_html
DirectoryIndex index.html
CustomLog
ErrorLog


3. apachectl restart
4. You are done with it ..

Regds,

Kaps
Nothing is impossible
'chris'
Super Advisor

Re: setup a virtual server by Apache 1.3.27

hi

thanks !

and how it works with own cgi-bin directory at /home/test/cgi-bin ?

greetings
chris
Vernon Brown_4
Trusted Contributor

Re: setup a virtual server by Apache 1.3.27

I think you add in your Virtualhost container:

ScriptAlias /cgi-bin/ "/your-own-cgi-path/cgi-bin/"
KapilRaj
Honored Contributor

Re: setup a virtual server by Apache 1.3.27

Let me confirm it..
Inside the virtual host definition ... Add

ScriptAlias /cgi-bin/ //cgi-bin/

Regds,

Kaps
Nothing is impossible
'chris'
Super Advisor

Re: setup a virtual server by Apache 1.3.27

hi Kapil

I had some problems with your steps,
but this configuration works perfectly:

-----------------------------------------------
NameVirtualHost intranet.domain


ServerName intranet.domain
ServerAlias intranet.domain
DocumentRoot /srv/www/htdocs



ServerName test.intranet.domain
DocumentRoot /home/user/public_html
Scriptalias /cgi-bin/ "/home/user/public_html/cgi-bin/"
ErrorLog /home/user/errorlog

-----------------------------------------------

greetings
chris