View previous topic :: View next topic |
Author |
Message |
legit Apprentice


Joined: 04 Jan 2006 Posts: 216 Location: Denver, CO
|
Posted: Sat Jul 21, 2007 4:11 pm Post subject: cacti on a vhost |
|
|
hey all,
i just set up apache and emerged cacti (didn't run config yet). what i would like to do is be able to access my normal website documents via typing into a browser on my computer http://mybox, where mybox is the hostname of my linux box (instead of having to type its ip address). in addition to this i want to set up a virtual host on apache to have http://cacti.mybox point to my cacti installation. heres what i was thinking so far for the vhosts:
Code: |
<VirtualHost *:80>
ServerName cacti.montag
DocumentRoot /cacti/path
</VirtualHost>
<VirtualHost *:80>
ServerName montag
DocumentRoot /apache/root/path
</VirtualHost> |
is this right?
and do i have to set up a domain in order to not have to use my ip address to access the linux box?
thanks,
- legit
PS. i only want to be able to access this server from within my home network, so i don't know if that changes things at all (i already know how to prevent outside access) |
|
Back to top |
|
 |
alex.blackbit Advocate

Joined: 26 Jul 2005 Posts: 2397
|
Posted: Sat Jul 21, 2007 6:11 pm Post subject: |
|
|
if you want to be able to reach a host on your internal network by name and do not want to make big efforts, just add a entry to /etc/hosts. note that this will only work on the machine where the entry exists. if you want a system that works on your whole network, you will need a dns server.
do you plan to run more than one website on the server? otherwise the default vhost would be sufficient. |
|
Back to top |
|
 |
legit Apprentice


Joined: 04 Jan 2006 Posts: 216 Location: Denver, CO
|
Posted: Sat Jul 21, 2007 6:24 pm Post subject: |
|
|
yeah, i plan on having several areas for testing sites (so multiple websites) on my linux machine. |
|
Back to top |
|
 |
alex.blackbit Advocate

Joined: 26 Jul 2005 Posts: 2397
|
|
Back to top |
|
 |
di1bert l33t


Joined: 16 May 2002 Posts: 963 Location: Oslo, Norway
|
Posted: Sat Jul 21, 2007 6:38 pm Post subject: |
|
|
Are you using webapp-config for installing your webapps liike Cacti ?
Check it out sometime if you haven't app-admin/webapp-config
And on a completely unrelated not, for the love of all things shiny keep
Cacti up to date !!! It's been really bad for us here in terms of security
holes.
</0.02c>
-m |
|
Back to top |
|
 |
legit Apprentice


Joined: 04 Jan 2006 Posts: 216 Location: Denver, CO
|
Posted: Sat Jul 21, 2007 6:45 pm Post subject: |
|
|
well, i was going to use web-app but i thought it would be better to create a virtual host first for cacti.
Thanks for the tips!
- legit |
|
Back to top |
|
 |
legit Apprentice


Joined: 04 Jan 2006 Posts: 216 Location: Denver, CO
|
Posted: Sat Jul 21, 2007 7:03 pm Post subject: |
|
|
So is there any way to set up an internal (to my home network) domain only. So i wont have to register the domain or anything? |
|
Back to top |
|
 |
alex.blackbit Advocate

Joined: 26 Jul 2005 Posts: 2397
|
Posted: Sat Jul 21, 2007 7:14 pm Post subject: |
|
|
again. you just need your hosts file for that. or a local dns server. NO domain registration on the internet needed for that. |
|
Back to top |
|
 |
legit Apprentice


Joined: 04 Jan 2006 Posts: 216 Location: Denver, CO
|
Posted: Sat Jul 21, 2007 8:01 pm Post subject: |
|
|
oh ok, thanks. |
|
Back to top |
|
 |
legit Apprentice


Joined: 04 Jan 2006 Posts: 216 Location: Denver, CO
|
Posted: Fri Jul 27, 2007 2:13 am Post subject: |
|
|
One Last question.
I've set up a vhost, what do i set the document root to? and also when setting up cacti with webapp-config what do i put for the host, is it just localhost or is it the name of the vhost i've set up (ie. cacti.domain.tld)?
thanks,
- legit |
|
Back to top |
|
 |
alex.blackbit Advocate

Joined: 26 Jul 2005 Posts: 2397
|
Posted: Fri Jul 27, 2007 7:01 am Post subject: |
|
|
when you define a vhost manually, you (normally) set the document root to a directory under /var/www/??????/htdocs. of course you have to create the directory yourself and set the right permissions. |
|
Back to top |
|
 |
|