# webserver config (apache experts) [SOLVED]

## h0mer`-

i need help with my webservers virtual host configuration.

i have 2 different webapplications installed at the moment. one is bugzilla and the other one is phpmyadmin. i installed both of them via webapp-config with the standard settings.

but i chose "pma" and "bugzilla" as hostnames, so they wont be in the default localhost directory.

root path to bugzilla installation

```
/var/www/bugzilla/htdocs
```

rootpath to phpmyadmin

```
/var/www/pma/htdocs
```

i have another website hosted on this machine in another path, that runs perfectly atm in /var/www/<website>

what i want to achieve now is the following and i dont even know if its possible at all.

i want the bugzilla site being accessible on bugzilla.domain.com/bugzilla and the phpmyadmin interface on pma.domain.com or maybe bugzilla.domain.com/pma i dont care about that.

can somebody please explain how to create a vhost configuration for that.

i hope everything is explained good enough to understand my problem.Last edited by h0mer`- on Fri Aug 01, 2008 10:25 am; edited 2 times in total

----------

## vaguy02

The sites would have to be bound to different IP addresses, then different DNS records would have to be added so:

DNS record

bug.domain.com    <ip 1>

my.domain.com     <ip 2>

where each vhost is bound to that ip in the config file. It should work just fine, people do it all the time.

Robert

----------

## think4urs11

no need to waste one ip per website, thats what virtual hosts are for.

http://httpd.apache.org/docs/2.2/en/vhosts/ should tell you all you need

----------

## h0mer`-

i tried it the apache docs way but no matter what i put into the vhost-config it doesnt work.

which parameters do i need to set?

canonical names? server alias? possibly a rewrite rule?

this is my current vhost file for bugzilla. doesnt work. well doesnt work is not right.... actually it works but only on "bugzilla.domain.com" what i want is that it only listens on "bugzilla.domain.com/bugzilla"

```
<VirtualHost *:80>

  ServerAlias bugzilla.domain.com/bugzilla

  UseCanonicalName On

  ServerName "bugzilla.domain.com"

  DocumentRoot "/var/www/bugzilla/htdocs"

        <Directory /var/www/bugzilla/htdocs>

                AddHandler cgi-script .cgi

                Options +Indexes +ExecCGI +FollowSymLinks

                DirectoryIndex index.cgi

                AllowOverride All

                Order Allow,Deny

                Allow from All

        </Directory>

</VirtualHost>
```

----------

## h0mer`-

funny.... looked into some other config files and found the solution for my problem....

just need to add an Alias line to my config and it works exactly like i want it to work.

```
Alias /bugzilla /var/www/bugzilla/htdocs
```

my config looks like this now

```
<VirtualHost *:80>

  ServerAlias bugzilla.domain.com/bugzilla

  UseCanonicalName On

  ServerName "bugzilla.domain.com"

  DocumentRoot "/var/www/bugzilla/htdocs"

  Alias /bugzilla /var/www/bugzilla/htdocs

        <Directory /var/www/bugzilla/htdocs>

                AddHandler cgi-script .cgi

                Options +Indexes +ExecCGI +FollowSymLinks

                DirectoryIndex index.cgi

                AllowOverride All

                Order Allow,Deny

                Allow from All

        </Directory>

</VirtualHost>
```

Thanks for your help.

----------

