Prev: games/wesnoth not localized ?
Next: unixodbc / libiodbc
From: Kaya Saman on 6 Jun 2010 07:50 Hi guys, I am trying to migrate over from Linux to FreeBSD and although have been using BSD for a few months now I really enjoy it and it's amazing ability to be light yet powerful and secure at the same time. Not to mention the UFS2 and ZFS filesystems which knowing UFS and ZFS from Solaris really rock!! Now am a first time user for Zabbix which came highly recommended; but Torrentflux I have moved between Linux machines quite a bit without any problem. My issue for both of these ports is that I'm in need of configuring Apache Include config files for them but having no luck in doing so..... I'm not really used to the native BSD Apache config as with Linux the httpd.conf or apache2.conf file is very different (similar to case to Bind9 too). Anyhow, I decided to use my standard Linux config file: Alias /torrentflux /opt/torrentflux <Directory /opt/torrentflux> Options FollowSymLinks AllowOverride Limit <IfModule mod_dir.c> DirectoryIndex index.php </IfModule> </Directory> of which kept spitting out "Permission Denied" errors?? On first glimpse one can already see that the alias and Directory statements don't point to the port!! The ports path is /usr/local/www/data/tf. I have tried pointing it to the port but also get the same error?? The instance of Torrentflux in /opt is a migrated one from Linux. This is in the Apache error log file: [Sun Jun 06 14:41:07 2010] [error] [client 192.168.1.110] client denied by server configuration: /opt/torrentflux/ it doesn't really explain much at all...... apart from the client 192.168.1.110 which is a reverse proxy using Squid. I attempted to modify the file as I found a working Include file for use with Drupal5 which I also have on the system. So the modification is like so: Alias /torrentflux /opt DocumentRoot "/opt" <Directory /opt> Options FollowSymLinks AllowOverride Limit # AllowOverride None Order allow,deny Allow from all # <IfModule mod_dir.c> # DirectoryIndex index.php # </IfModule> </Directory> <IfModule php5_module> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps <IfModule dir_module> <IfModule mod_dir.c> DirectoryIndex index.php index.html </IfModule> </IfModule> </IfModule> #</Directory> Oh clump!!! Which I've just modded to /opt/torrentflux for the Alias and the same for the <Directory> directive too.... I can't believe I missed that :-O It works now finally but is asking for a MySQL database instance which is easy!!! Few..... Now for Zabbix as I haven't got anywhere that actually gives the Apache config? I downloaded the PDF manual for it which doesn't actually even tell you which URL to go for the main page so how do I get that info or will I need to hack this one out like Torrentflux?? Thanks, Kaya _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"
From: Kaya Saman on 6 Jun 2010 10:20 On 06/06/2010 02:50 PM, Kaya Saman wrote: > Hi guys, > > I am trying to migrate over from Linux to FreeBSD and although have > been using BSD for a few months now I really enjoy it and it's amazing > ability to be light yet powerful and secure at the same time. Not to > mention the UFS2 and ZFS filesystems which knowing UFS and ZFS from > Solaris really rock!! > > Now am a first time user for Zabbix which came highly recommended; but > Torrentflux I have moved between Linux machines quite a bit without > any problem. > > My issue for both of these ports is that I'm in need of configuring > Apache Include config files for them but having no luck in doing so..... > > I'm not really used to the native BSD Apache config as with Linux the > httpd.conf or apache2.conf file is very different (similar to case to > Bind9 too). > > Anyhow, I decided to use my standard Linux config file: > > Alias /torrentflux /opt/torrentflux > > <Directory /opt/torrentflux> > Options FollowSymLinks > AllowOverride Limit > <IfModule mod_dir.c> > DirectoryIndex index.php > </IfModule> > </Directory> > > of which kept spitting out "Permission Denied" errors?? > > On first glimpse one can already see that the alias and Directory > statements don't point to the port!! The ports path is > /usr/local/www/data/tf. I have tried pointing it to the port but also > get the same error?? > > The instance of Torrentflux in /opt is a migrated one from Linux. This > is in the Apache error log file: > > [Sun Jun 06 14:41:07 2010] [error] [client 192.168.1.110] client > denied by server configuration: /opt/torrentflux/ > > it doesn't really explain much at all...... apart from the client > 192.168.1.110 which is a reverse proxy using Squid. > > I attempted to modify the file as I found a working Include file for > use with Drupal5 which I also have on the system. So the modification > is like so: > > Alias /torrentflux /opt > > DocumentRoot "/opt" > > <Directory /opt> > Options FollowSymLinks > AllowOverride Limit > > # AllowOverride None > > Order allow,deny > Allow from all > > # <IfModule mod_dir.c> > # DirectoryIndex index.php > # </IfModule> > </Directory> > > <IfModule php5_module> > AddType application/x-httpd-php .php > AddType application/x-httpd-php-source .phps > <IfModule dir_module> > <IfModule mod_dir.c> > DirectoryIndex index.php index.html > </IfModule> > </IfModule> > </IfModule> > #</Directory> > > > Oh clump!!! Which I've just modded to /opt/torrentflux for the Alias > and the same for the <Directory> directive too.... I can't believe I > missed that :-O > > It works now finally but is asking for a MySQL database instance which > is easy!!! Few..... > > Now for Zabbix as I haven't got anywhere that actually gives the > Apache config? > > I downloaded the PDF manual for it which doesn't actually even tell > you which URL to go for the main page so how do I get that info or > will I need to hack this one out like Torrentflux?? > > Thanks, > > Kaya > _______________________________________________ > freebsd-ports(a)freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org" Ok so for Zabbix I managed to find a site that was for configuring under CentOS: http://www.muck.net/?p=16 Now the key here is that the www dir of Zabbix points to /var/www/html/zabbix/conf which is very unlike the BSD port.... So as I already have a patched together Torrenflux config we just cp the config file for Torrentflux to Zabbix and edit the file as so: Alias /zabbix /usr/local/share/zabbix/php DocumentRoot "/usr/local" <Directory /usr/local/share/zabbix/php> Options FollowSymLinks AllowOverride Limit # AllowOverride None Order allow,deny Allow from all # <IfModule mod_dir.c> # DirectoryIndex index.php # </IfModule> </Directory> <IfModule php5_module> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps <IfModule dir_module> <IfModule mod_dir.c> DirectoryIndex index.php index.html </IfModule> </IfModule> </IfModule> #</Directory> This fudge now actually works so onto setting the Zabbix process up which like Torrentflux should be relatively easy and straight forward. The only thing I don't get with FreeBSD ports is why there aren't template files for doing things like this, as people like me with not much experience in the FreeBSD world have to really struggle. I guess one could say the same about Solaris which doesn't give you ANY config for some software such as Bind which means you need to either grab an 'already configured' version from Linux or build the config files up from scratch which is pretty time consuming!! I mean coming off of two weeks of severe fatigue it's taken me 2 days to configure: Net-SNMP Cacti Torrentflux Squid in Jail Zabbix A radio station comprising of Darkice, Icecast2, Drupal5 and xmms2 as the base audio core Logwatch on 2 servers Munin and a bunch of other stuff that I can't recall now which I'm thinking if I was work I'd have to have done that in half a day as I already got pushed when took a day to configure MS Hyper-V after never hearing about the software before...?? I don't know.... it is fun; lot's of fun when have the time but if configuring for business grade production then I just feel that there should be slightly more help in the files with templates and examples etc.... - highly debatable of course and apologies if I sound like I'm whining I honestly really enjoyed myself doing all this and what made it more fun is that the systems that I did the work on are geographically separated from myself which just shows the power of UNIX and SSH over MS Win and RDP which to me is only for Sun Ray's and nothing more :-) . Well anyway this seems all done now so yeah that's it :-D Regards, Kaya _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"
From: Doug Barton on 6 Jun 2010 15:46 On 06/06/10 07:20, Kaya Saman wrote: > The only thing I don't get with FreeBSD ports is why there aren't > template files for doing things like this, as people like me with not > much experience in the FreeBSD world have to really struggle. So first of all, welcome to the FreeBSD world. :) By default our ports system does not install things in /opt, our default installation path for 3rd party software is /usr/local. So in regards to your question, most ports do actually come with sample configuration files, which can usually be found in /usr/local/etc/. If you install a port or package and you aren't sure where it installed the files you can do (for exapmle) 'pkg_info -L torrentflux*' and it will print the list for you. There is no question that there is a learning curve when moving from one platform to another, but a lot of us have administered both FreeBSD and Linux systems so if you have questions, just ask. hope this helps, Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"
From: Matthew Seaman on 6 Jun 2010 16:36 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/06/2010 15:20:10, Kaya Saman wrote: > I don't know.... it is fun; lot's of fun when have the time but if > configuring for business grade production then I just feel that there > should be slightly more help in the files with templates and examples > etc.... - highly debatable of course and apologies if I sound like I'm > whining I honestly really enjoyed myself doing all this and what made it > more fun is that the systems that I did the work on are geographically > separated from myself which just shows the power of UNIX and SSH over MS > Win and RDP which to me is only for Sun Ray's and nothing more :-) . Doug already made some general comments, but on the particular subject of Apache configuration, you're right. Ported web applications generally do not install sample Apache configuration files. There are three aspects to this: * FreeBSD ports of daemons, etc. are usually installed in a disabled configuration. The sysadmin needs to take extra steps to turn everything on. While this may seem like forcing users to jump through pointless hoops to some, to many others this is a lifesaving security enhancement and foot-shooting avoidance measure. * We don't necessarily want to assume that you are using Apache as your webserver. Apache is great, but there are alternative HTTP servers in the ports which can leave it in the dust in terms of performance. * Even if you are using Apache, we don't necessarily want to assume that a 'one size fits all' configuration is going to be right for you. Having to grovel through a maze of twisty little apache configuration snippets (all alike) in order to undo some well meaning but ultimately wrong settings gets old really quickly. Especially if you have to do it again every time some related port gets updated. It's a philosophical difference between *BSD and much of the rest of the world: we think computers are there to do what the *admin* in charge tells them to do, no more and no less. Consequently we expect to take pains to tell them exactly what we want. Having said all that, many web applications will display a pkg-message on installation with hints about how to configure Apache. You can display these messages again by: % pkg_info -Dx portname There are also frequently instructions in various documentation installed under /usr/local/share. Most web apps generally want some combination of aliases to map the application directory into the web tree at an appropriate URL, plus a <Directory> or <Location> block (or several) to set options, access controls, basic auth password and so forth. Given a little practice such setups are not particularly hard to write, and there are a lot of people on this list who would be happy to help with any specific problems. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew(a)infracaninophile.co.uk Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwMBt8ACgkQ8Mjk52CukIzSagCdFrLouTfwa19/e7aoztf5S70x GdoAniFIYtp0GMMoWlolZoxQsqbyvtsb =1X8Q -----END PGP SIGNATURE----- _______________________________________________ freebsd-ports(a)freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"
From: "Philip M. Gollucci" on 6 Jun 2010 17:20
On 6/6/2010 4:36 PM, Matthew Seaman wrote: > There are also frequently instructions in various documentation > installed under /usr/local/share. Most web apps generally want some > combination of aliases to map the application directory into the web > tree at an appropriate URL, plus a <Directory> or <Location> block (or > several) to set options, access controls, basic auth password and so > forth. Given a little practice such setups are not particularly hard to > write, and there are a lot of people on this list who would be happy to > help with any specific problems. There are plans to have every mod_* port install a file in ${APACHEETCDIR}/Includes as mod_${AP_NAME}.conf.sample which contain the LoadModule line and some relevant default config. All you'd need to do to active it is cp it to mod_$name.conf and the default httpd.conf will pick it up. Thus cleanup up a lot of Makefiles and pkg-plist shenanagins while hopefully being self documenting for the module. -- ------------------------------------------------------------------------ 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C Philip M. Gollucci (pgollucci(a)p6m7g8.com) c: 703.336.9354 VP Apache Infrastructure; Member, Apache Software Foundation Committer, FreeBSD Foundation Consultant, P6M7G8 Inc. Sr. System Admin, Ridecharge Inc. Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching. |