Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
webserver config (apache experts) [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
h0mer`-
Apprentice
Apprentice


Joined: 02 Aug 2004
Posts: 215

PostPosted: Thu Jul 31, 2008 6:03 pm    Post subject: webserver config (apache experts) [SOLVED] Reply with quote

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
View user's profile Send private message
vaguy02
Guru
Guru


Joined: 25 Feb 2005
Posts: 424
Location: Hopefully in one place

PostPosted: Thu Jul 31, 2008 8:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Thu Jul 31, 2008 8:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
h0mer`-
Apprentice
Apprentice


Joined: 02 Aug 2004
Posts: 215

PostPosted: Thu Jul 31, 2008 9:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
h0mer`-
Apprentice
Apprentice


Joined: 02 Aug 2004
Posts: 215

PostPosted: Fri Aug 01, 2008 10:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum