Operating System - HP-UX
1825060 Members
5209 Online
109679 Solutions
New Discussion юеВ

Apache Simple Local Virtual Hosts

 
Rob Daniels
Advisor

Apache Simple Local Virtual Hosts

Hi,
I am trying to set up a virtual host on our local development system hp9000 rp2470 (HP-UX B.11.11/Apache 1.3.19).

What I did:
/etc/hosts
192.###.##.## hp9000 hp9000.pol

Hostname is hp9000 and alias hp9000.pol

/opt/apache/conf/httpd.conf
### Section 1: Global Environment
ServerType standalone
ServerRoot /opt/apache
BindAddress *

### Section 2: 'Main' server configuration
Port 80
Listen 80
Servername hp9000
DocumentRoot "/samba_homes/www"

### Section 3: Virtual Hosts
NameVirtualHost *

ServerName hp9000
DocumentRoot /samba_homes/www
ErrorLog /samba_homes/www/error_log
CustomLog /samba_homes/www/access_log common
TransferLog /opt/apache/logs/access_log


DocumentRoot /samba_homes/www/pol
ServerName hp9000.pol
ErrorLog /samba_homes/www/pol/error_log
TransferLog /samba_homes/www/pol/access_log


When I enter hp9000 in my browser, I see the content of /samba_homes/www directory. This is good, this works (not bad for a first time).

When I enter hp9000.pol in my browser, I hoped to see the content of the /samba_homes/www/pol directory. But the browser tells me it can not find it.

What did I do wrong or what did I forget to do.

Thank you very much if you can help me.
Kind regards
Rob
2 REPLIES 2
Mark Greene_1
Honored Contributor

Re: Apache Simple Local Virtual Hosts

Do you have a "Directory" entry for each DocumentRoot directory you want to establish? Also, do you have authentication setup? If you are using .htaccess files, you'll need one in each directory.

mark
the future will be a lot like now, only later
Rob Daniels
Advisor

Re: Apache Simple Local Virtual Hosts

Hi Mark,

Yes I have:


ServerName hp9000
DocumentRoot /samba_homes/www
ErrorLog /samba_homes/www/error_log
CustomLog /samba_homes/www/access_log common
TransferLog /opt/apache/logs/access_log

Options Indexes FollowSymLinks ExecCGI MultiViews
AllowOverride None
Order allow,deny
Allow from all





DocumentRoot /samba_homes/www/pol
ServerName hp9000.pol
ErrorLog /samba_homes/www/pol/error_log
TransferLog /samba_homes/www/pol/access_log

Options Indexes FollowSymLinks ExecCGI MultiViews
AllowOverride None
Order allow,deny
Allow from all



Both directories have a .htaccess file:
PassEnv "SHLIB_PATH"
PassEnv "LIBPATH"
PassEnv "LD_LIBRARY_PATH"
PassEnv "EQ_DBSERVER"

I do not have an authentication setup. Do I have to?

Kind regards
Rob