Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cacti on a vhost
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
legit
Apprentice
Apprentice


Joined: 04 Jan 2006
Posts: 216
Location: Denver, CO

PostPosted: Sat Jul 21, 2007 4:11 pm    Post subject: cacti on a vhost Reply with quote

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
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Sat Jul 21, 2007 6:11 pm    Post subject: Reply with quote

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


Joined: 04 Jan 2006
Posts: 216
Location: Denver, CO

PostPosted: Sat Jul 21, 2007 6:24 pm    Post subject: Reply with quote

yeah, i plan on having several areas for testing sites (so multiple websites) on my linux machine.
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Sat Jul 21, 2007 6:26 pm    Post subject: Reply with quote

http://httpd.apache.org/docs/2.2/vhosts/
Back to top
View user's profile Send private message
di1bert
l33t
l33t


Joined: 16 May 2002
Posts: 963
Location: Oslo, Norway

PostPosted: Sat Jul 21, 2007 6:38 pm    Post subject: Reply with quote

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


Joined: 04 Jan 2006
Posts: 216
Location: Denver, CO

PostPosted: Sat Jul 21, 2007 6:45 pm    Post subject: Reply with quote

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


Joined: 04 Jan 2006
Posts: 216
Location: Denver, CO

PostPosted: Sat Jul 21, 2007 7:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Sat Jul 21, 2007 7:14 pm    Post subject: Reply with quote

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


Joined: 04 Jan 2006
Posts: 216
Location: Denver, CO

PostPosted: Sat Jul 21, 2007 8:01 pm    Post subject: Reply with quote

oh ok, thanks.
Back to top
View user's profile Send private message
legit
Apprentice
Apprentice


Joined: 04 Jan 2006
Posts: 216
Location: Denver, CO

PostPosted: Fri Jul 27, 2007 2:13 am    Post subject: Reply with quote

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
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Fri Jul 27, 2007 7:01 am    Post subject: Reply with quote

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
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