View previous topic :: View next topic |
Author |
Message |
h0mer`- Apprentice

Joined: 02 Aug 2004 Posts: 215
|
Posted: Thu Jul 31, 2008 6:03 pm Post subject: webserver config (apache experts) [SOLVED] |
|
|
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
Code: | /var/www/bugzilla/htdocs |
rootpath to phpmyadmin
Code: | /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 |
|
Back to top |
|
 |
vaguy02 Guru


Joined: 25 Feb 2005 Posts: 424 Location: Hopefully in one place
|
Posted: Thu Jul 31, 2008 8:38 pm Post subject: |
|
|
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 _________________ Linux Registered User #458185
Intel Quad-Core w/ 4gigs Ram w/ 8800 GTX - Windows 7 RC
2x (Intel Dual-Core w/ 2gigs Ram - Gentoo)
Mac G5 Dual-Core w/ 2gigs Ram - OS 10.5 |
|
Back to top |
|
 |
think4urs11 Bodhisattva


Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Thu Jul 31, 2008 8:50 pm Post subject: |
|
|
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 _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
 |
h0mer`- Apprentice

Joined: 02 Aug 2004 Posts: 215
|
Posted: Thu Jul 31, 2008 9:36 pm Post subject: |
|
|
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"
Code: | <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> |
|
|
Back to top |
|
 |
h0mer`- Apprentice

Joined: 02 Aug 2004 Posts: 215
|
Posted: Fri Aug 01, 2008 10:08 am Post subject: |
|
|
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.
Code: | Alias /bugzilla /var/www/bugzilla/htdocs |
my config looks like this now
Code: | <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. |
|
Back to top |
|
 |
|