Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to enable url rewriting in apache?
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
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 333
Location: Minsk, Belarus

PostPosted: Tue Sep 13, 2011 2:30 pm    Post subject: how to enable url rewriting in apache? Reply with quote

anyone got any idea how to enable url rewriting in apache? i searched the internet and found guidelines to enable mod rewrite on ubuntu and debain but not for gentoo and it seems they are totally different so i thought i might ask here for help.
Back to top
View user's profile Send private message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Tue Sep 13, 2011 3:05 pm    Post subject: Reply with quote

Here is a list of modules for Apache2' APACHE2_MODULES in the make.conf:
http://www.gentoo.org/proj/en/apache/doc/upgrading.xml
Once Apache is rebuild, you need to enable it in the /etc/conf.d/apache2
_________________
Gentoo on Uptime Project - Larry is a cow
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 333
Location: Minsk, Belarus

PostPosted: Thu Sep 15, 2011 1:36 pm    Post subject: Reply with quote

i ended up doing
Code:
emerge --ask --verbose --update --newuse --deep world

which took a day with the previous steps mentioned in your link
but any way i found url rewriting in /etc/pnp/config.php
Code:
$conf['use_url_rewriting'] = 1;

but that didn't solve my problem with pnp4nagios i still have
Code:
PHP socket extension    PHP socket extension not available

i'm inclined to think this is a problem with php even though the previous tests
Code:
PHP GD extension    Pass
PHP function proc_open()    Pass
PHP zlib extension    Pass
PHP session extension    Pass
PHP JSON extension    Pass
PHP magic_quotes_gpc    Off
Apache Rewrite Module    Pass

this is the result when typing http://10.1.1.212/pnp4nagios/ any idea about this?
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Thu Sep 15, 2011 3:12 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Networking & Security as it is not about installing Gentoo.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 333
Location: Minsk, Belarus

PostPosted: Mon Sep 19, 2011 6:13 am    Post subject: pnp4nagios still not working Reply with quote

i got it working since then by adding sockets to /et/make.conf and now use looks like this:
Code:

USE="3dnow 3dnowext aalib acpi apache2 apm calendar cgi dhcpcd dict ftp ftpd
     fuse gd gzip jpeg jpeg2k jpgraph nagios-dns nagios-game nagios-ntp
     nagios-ping nagios-ssh ntfs pdf php png postfix rar reiser4 reiserfs
     rrdcgi rrdtool sendmail snmp splash sse sse2 sse3 ssh svg winbind
     wireshark xml zip [color=darkred]sockets[/color] -X -alsa -bittorrent -doc -ipv6"


then i
Code:

emerge php

and now errors disappeared in the http:server/pnp4nagios as shown below:
Code:

PNP4Nagios Environment Tests

The following options are determined by "configure". If any of the tests have failed, consult the documentation for more information on how to correct the problem.
PNP4Nagios Version    pnp4nagios-0.6.13
Prefix    /usr/local/pnp4nagios
Configure Arguments    ./configure '--with-rrdtool=/usr/local/rrdtool/bin/rrdtool' '--with-httpd-conf=/usr/local/apache2/conf/extra' '--with-perl_lib_path=/usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi' '--with-perfdata-dir=/var/nagios/perfdata'
RRD Storage    /var/nagios/perfdata is readable.
RRDtool Binary    /usr/local/rrdtool/bin/rrdtool is executable by PHP
PHP GD extension    Pass
PHP function proc_open()    Pass
PHP zlib extension    Pass
PHP session extension    Pass
PHP JSON extension    Pass
PHP magic_quotes_gpc    Off
PHP socket extension    Pass
Apache Rewrite Module    Pass
Kohana Environment Tests

The following tests have been run to determine if Kohana will work in your environment. If any of the tests have failed, consult the documentation for more information on how to correct the problem.
PHP Version    5.3.8-pl0-gentoo
System Directory    /usr/local/pnp4nagios/lib/kohana/system/
Application Directory    /usr/local/pnp4nagios/share/application/
Reflection Enabled    Pass
Iconv Extension Loaded    Pass
Mbstring Not Overloaded    Pass
URI Determination    Pass

Your environment passed all requirements. Remove or rename the /usr/local/pnp4nagios/share/install.php file now.

after renaming the install.php to install.ignore
i click on the graph of ping but instead of the graph i get the following error:
Code:

PNP4Nagios Version 0.6.13
Please check the documentation for information about the following error.

Object of class stdClass could not be converted to string
file [line]:

application/views/template.php [100]:

back
   
Actions
Loaded in 0.0382 seconds, using 1.79MB of memory. Generated by Kohana v2.3.4.


is this still a problem with php or some configuration in apache? thanks for your help :)
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 333
Location: Minsk, Belarus

PostPosted: Mon Sep 19, 2011 11:25 am    Post subject: Reply with quote

according to the configuration guide npcd should be started in the end. but when i try
Code:

/etc/init.d/npcd start

i get:
Code:

* Starting npcd ...
An Error occured while reading your config on line 0
Message was: "ERROR - Could not open config file - No such file or directory"
 * start-stop-daemon: failed to start `/usr/bin/npcd'
 * Failed to Start npcd                                                   [ !! ]
 * ERROR: npcd failed to start

i don't know were this configuration file should be.
i tried
Code:

emerge --search npcd

i got
Code:

Searching...    srvmonm libexec # emerge --search npcd
Searching...
[ Results for search key : npcd ]
[ Applications found : 0 ]

can anyone help with this?. it seems this application is essential for pnp4nagios 0.6
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Tue Sep 20, 2011 4:47 am    Post subject: Reply with quote

config files for the init script itself should be in /etc/conf.d (so, in this case, /etc/conf.d/npcd)

the path for the runtime configuration file for whatever daemon can often be found in the text of /etc/conf.d/<whatever> as well, though sometimes it's hard-coded in /etc/init.d/<scriptname>

many times packages will provide an '/etc/somename.conf.example', which you have to edit and rename to '/etc/somename.conf'

Far as seeing what files are provided with a package, emerge gentoolkit if you havent already, then

Code:

equery files <pkgname>

_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 333
Location: Minsk, Belarus

PostPosted: Tue Sep 20, 2011 8:37 am    Post subject: Reply with quote

well thanks for the valuable information, much appreciated but i did
Code:
qfile npcd

and got :
Code:
net-analyzer/pnp4nagios (/etc/init.d/npcd)
net-analyzer/pnp4nagios (/usr/bin/npcd)

and there was no npcd file in /etc/conf.d
anyway it turned out that it is installed when pnp4nagios is installed and it is used when bulk mode with npcd is used in pnp. i however have configured pnp with sync mode and therefore don't need npcd configuration and it turns out that the problem was with apache as i read in another forum. in /etc/conf.d/apache i added -D PNP and now the line looks like this:
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -D PERL -D NAGIOS -D PNP"

and the graphs worked at last, of course apache had to be restarted before it worked :)
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