[opensuse] Re: [opensuse-factory] How do you allow connections from 127.0.0.1 to apache2
doiggl@velocitynet.com.au wrote:
Hello, Results so far:
# ss -ltn State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 :::22 :::* LISTEN 0 128 *:22 *:* LISTEN 0 128 :::631 :::* LISTEN 0 100 *:25 *:*
So nothing is listening on port 80.
# rpm -qa |grep -i apache2 | sort apache2-2.2.22-8.4.x86_64 apache2-example-pages-2.2.22-8.4.x86_64 apache2-mod_php5-5.3.17-2.3.x86_64 apache2-prefork-2.2.22-8.4.x86_64 apache2-utils-2.2.22-8.4.x86_64
Okay.
# ps -ef | grep httpd root 7158 3441 0 17:23 pts/1 00:00:00 grep --color=auto httpd
Yes, you need to start apache - "systemctl start apache2.service". To have it started at boot-up, "systemctl enable apache2.service". -- Per Jessen, Zürich (5.8°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 28 Nov 2012 08:03:01 +0100, Per Jessen <per@computer.org> wrote:
doiggl@velocitynet.com.au wrote:
Hello, Results so far:
# ss -ltn State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 :::22 :::* LISTEN 0 128 *:22 *:* LISTEN 0 128 :::631 :::* LISTEN 0 100 *:25 *:*
So nothing is listening on port 80.
# rpm -qa |grep -i apache2 | sort apache2-2.2.22-8.4.x86_64 apache2-example-pages-2.2.22-8.4.x86_64 apache2-mod_php5-5.3.17-2.3.x86_64 apache2-prefork-2.2.22-8.4.x86_64 apache2-utils-2.2.22-8.4.x86_64
Okay.
# ps -ef | grep httpd root 7158 3441 0 17:23 pts/1 00:00:00 grep --color=auto httpd
Yes, you need to start apache - "systemctl start apache2.service". To have it started at boot-up, "systemctl enable apache2.service".
Hello, Results as follows --Glenn # systemctl start apache2.service Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details. # systemctl status apache2.service apache2.service - apache Loaded: loaded (/lib/systemd/system/apache2.service; enabled) Active: failed (Result: exit-code) since Wed, 2012-11-28 21:48:17 EST; 46s ago Process: 11606 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE) CGroup: name=systemd:/system/apache2.service Nov 28 21:48:17 test.site systemd[1]: Starting apache... Nov 28 21:48:17 test.site start_apache2[11606]: httpd2-prefork: Syntax error on line 205 of /etc/apache2/httpd.conf: Syntax error on line 1 of /etc/apac...t closed. Nov 28 21:48:17 test.site systemd[1]: Failed to start apache. Nov 28 21:48:17 test.site systemd[1]: Unit apache2.service entered failed state # head -205 /etc/apache2/httpd.conf | tail -1 Include /etc/apache2/vhosts.d/*.conf # systemctl start apache2.service Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details. # systemctl status apache2.service apache2.service - apache Loaded: loaded (/lib/systemd/system/apache2.service; enabled) Active: failed (Result: exit-code) since Wed, 2012-11-28 21:48:17 EST; 46s ago Process: 11606 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE) CGroup: name=systemd:/system/apache2.service Nov 28 21:48:17 test.site systemd[1]: Starting apache... Nov 28 21:48:17 test.site start_apache2[11606]: httpd2-prefork: Syntax error on line 205 of /etc/apache2/httpd.conf: Syntax error on line 1 of /etc/apac...t closed. Nov 28 21:48:17 test.site systemd[1]: Failed to start apache. Nov 28 21:48:17 test.site systemd[1]: Unit apache2.service entered failed state # head -205 /etc/apache2/httpd.conf | tail -1 Include /etc/apache2/vhosts.d/*.conf # ll /etc/apache2/vhosts.d/*.conf -rw-r--r-- 1 root root 2113 Nov 22 22:50 /etc/apache2/vhosts.d/cacti.conf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
doiggl@velocitynet.com.au wrote:
# ps -ef | grep httpd root 7158 3441 0 17:23 pts/1 00:00:00 grep --color=auto httpd
Yes, you need to start apache - "systemctl start apache2.service". To have it started at boot-up, "systemctl enable apache2.service".
Hello, Results as follows --Glenn
# systemctl start apache2.service Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details.
# systemctl status apache2.service apache2.service - apache Loaded: loaded (/lib/systemd/system/apache2.service; enabled) Active: failed (Result: exit-code) since Wed, 2012-11-28 21:48:17 EST; 46s ago Process: 11606 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE) CGroup: name=systemd:/system/apache2.service
Nov 28 21:48:17 test.site systemd[1]: Starting apache... Nov 28 21:48:17 test.site start_apache2[11606]: httpd2-prefork: Syntax error on line 205 of /etc/apache2/httpd.conf: Syntax error on line 1 of /etc/apac...t closed.
# head -205 /etc/apache2/httpd.conf | tail -1 Include /etc/apache2/vhosts.d/*.conf
# head -205 /etc/apache2/httpd.conf | tail -1 Include /etc/apache2/vhosts.d/*.conf
# ll /etc/apache2/vhosts.d/*.conf -rw-r--r-- 1 root root 2113 Nov 22 22:50 /etc/apache2/vhosts.d/cacti.conf
I think this means there is a problem in the config: /etc/apache2/vhosts.d/cacti.conf Try posting it and I'll see if I can spot anything obvious. Still, if that is from an openSUSE package, it ought to just work. -- Per Jessen, Zürich (5.1°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 28 Nov 2012 13:31:15 +0100, Per Jessen <per@computer.org> wrote:
doiggl@velocitynet.com.au wrote:
# ps -ef | grep httpd root 7158 3441 0 17:23 pts/1 00:00:00 grep --color=auto httpd
Yes, you need to start apache - "systemctl start apache2.service". To have it started at boot-up, "systemctl enable apache2.service".
Hello, Results as follows --Glenn
# systemctl start apache2.service Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details.
# systemctl status apache2.service apache2.service - apache Loaded: loaded (/lib/systemd/system/apache2.service; enabled) Active: failed (Result: exit-code) since Wed, 2012-11-28 21:48:17 EST; 46s ago Process: 11606 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE) CGroup: name=systemd:/system/apache2.service
Nov 28 21:48:17 test.site systemd[1]: Starting apache... Nov 28 21:48:17 test.site start_apache2[11606]: httpd2-prefork: Syntax error on line 205 of /etc/apache2/httpd.conf: Syntax error on line 1 of /etc/apac...t closed.
# head -205 /etc/apache2/httpd.conf | tail -1 Include /etc/apache2/vhosts.d/*.conf
# head -205 /etc/apache2/httpd.conf | tail -1 Include /etc/apache2/vhosts.d/*.conf
# ll /etc/apache2/vhosts.d/*.conf -rw-r--r-- 1 root root 2113 Nov 22 22:50 /etc/apache2/vhosts.d/cacti.conf
I think this means there is a problem in the config:
/etc/apache2/vhosts.d/cacti.conf
Try posting it and I'll see if I can spot anything obvious. Still, if that is from an openSUSE package, it ought to just work.
-- Per Jessen, Zürich (5.1°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland.
Hello, /etc/apache2/vhosts.d/cacti.conf content as follows: # cat /etc/apache2/vhosts.d/cacti.conf <?php /* +-------------------------------------------------------------------------+ | Copyright (C) 2004-2011 The Cacti Group | | | | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU General Public License | | as published by the Free Software Foundation; either version 2 | | of the License, or (at your option) any later version. | | | | This program is distributed in the hope that it will be useful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | +-------------------------------------------------------------------------+ | Cacti: The Complete RRDTool-based Graphing Solution | +-------------------------------------------------------------------------+ | This code is designed, written, and maintained by the Cacti Group. See | | about.php and/or the AUTHORS file for specific developer information. | +-------------------------------------------------------------------------+ | http://www.cacti.net/ | +-------------------------------------------------------------------------+ */ /* make sure these values refect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cactidb"; $database_hostname = "localhost"; $database_username = "cactiusername"; $database_password = "cactipassword"; $database_port = "3306"; $database_ssl = false; /* Edit this to point to the default URL of your Cacti install ex: if your cacti install as at http://serverip/cacti/ this would be set to /cacti/ */ $url_path = "/"; /* Default session name - Session name must contain alpha characters */ $cacti_session_name = "Cacti"; ?> Other information ================= This came about when I was trying to follow this documentation on setup and running cacti[1] on opensuse. Cacti rpm {cacti-0.8.8a-12.3.noarch.rpm} sourced from [2] Cheers Glenn [1]http://en.opensuse.org/Cacti [2]http://ftp5.gwdg.de/pub/opensuse/repositories/server:/monitoring/openSUSE_Fa... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
doiggl@velocitynet.com.au wrote:
On Wed, 28 Nov 2012 13:31:15 +0100, Per Jessen <per@computer.org> wrote: [snip]
I think this means there is a problem in the config:
/etc/apache2/vhosts.d/cacti.conf
Try posting it and I'll see if I can spot anything obvious. Still, if that is from an openSUSE package, it ought to just work.
-- Per Jessen, Zürich (5.1°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland.
Hello,
/etc/apache2/vhosts.d/cacti.conf content as follows:
# cat /etc/apache2/vhosts.d/cacti.conf <?php /*
Well, that one's easy - that is not an apache config file, that's a PHP script. It probably belongs in the document root instead. -- Per Jessen, Zürich (5.1°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 28 Nov 2012 15:52:16 +0100, Per Jessen <per@computer.org> wrote:
doiggl@velocitynet.com.au wrote:
On Wed, 28 Nov 2012 13:31:15 +0100, Per Jessen <per@computer.org> wrote: [snip]
I think this means there is a problem in the config:
/etc/apache2/vhosts.d/cacti.conf
Try posting it and I'll see if I can spot anything obvious. Still, if that is from an openSUSE package, it ought to just work.
-- Per Jessen, Zürich (5.1°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland.
Hello,
/etc/apache2/vhosts.d/cacti.conf content as follows:
# cat /etc/apache2/vhosts.d/cacti.conf <?php /*
Well, that one's easy - that is not an apache config file, that's a PHP script. It probably belongs in the document root instead.
-- Per Jessen, Zürich (5.1°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland.
Hello, File listing and content # ll /srv/www/htdocs/ total 16 -rw-r--r-- 1 root root 302 Mar 13 2006 favicon.ico drwxr-xr-x 2 root root 208 Oct 15 20:38 gif -rw-r--r-- 1 root root 44 Nov 21 2004 index.html -rw-r--r-- 1 root root 2356 Sep 24 04:51 info2html.css -rw-r--r-- 1 root root 26 Nov 16 02:44 robots.txt file content # cat /srv/www/htdocs/index.html <html><body><h1>It works!</h1></body></html> file owner # rpm -qf /srv/www/htdocs/index.html apache2-example-pages-2.2.22-8.4.x86_64 Next problem firefox http://127.0.0.1/ shows error: Unable to connect Firefox can't establish a connection to the server at 127.0.0.1. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. Observation: Firewall setting needs changing , but dont know which one. File listings: # ll /srv/www/ total 2 drwxr-xr-x 10 root root 1568 Nov 23 00:54 cacti drwxr-xr-x 2 root root 184 Nov 7 03:33 cgi-bin drwxr-xr-x 4 root root 128 Oct 15 20:38 htdig drwxr-xr-x 3 root root 200 Nov 16 12:33 htdocs # ll /etc/apache2/vhosts.d/ total 24 -rw-r--r-- 1 root root 2113 Nov 22 22:50 cacti.conf drwxr-xr-x 2 root root 80 Nov 23 00:54 conf.d -rw-r--r-- 1 root root 9265 Nov 16 02:44 vhost-ssl.template -rw-r--r-- 1 root root 4306 Nov 16 02:44 vhost.template Two Questions: - Which firewall settings needs changing to allow 127.0.0.1 in firefox ? - How should should I call/reference "/etc/apache2/vhosts.d/cacti.conf" PHP script/mysql from the apeche2 /srv/www/htdocs/index.html file ? Thanks for all the help. --Glenn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
doiggl@velocitynet.com.au wrote:
Hello,
/etc/apache2/vhosts.d/cacti.conf content as follows:
# cat /etc/apache2/vhosts.d/cacti.conf <?php /*
Well, that one's easy - that is not an apache config file, that's a PHP script. It probably belongs in the document root instead.
Hello,
File listing and content
# ll /srv/www/htdocs/ total 16 -rw-r--r-- 1 root root 302 Mar 13 2006 favicon.ico drwxr-xr-x 2 root root 208 Oct 15 20:38 gif -rw-r--r-- 1 root root 44 Nov 21 2004 index.html -rw-r--r-- 1 root root 2356 Sep 24 04:51 info2html.css -rw-r--r-- 1 root root 26 Nov 16 02:44 robots.txt
file content # cat /srv/www/htdocs/index.html <html><body><h1>It works!</h1></body></html>
file owner # rpm -qf /srv/www/htdocs/index.html apache2-example-pages-2.2.22-8.4.x86_64
Right, so far so good.
Next problem firefox http://127.0.0.1/ shows error:
Unable to connect Firefox can't establish a connection to the server at 127.0.0.1.
Glenn, as we have already established, apache does not start due to the cacti.conf php-script in the vhosts.d directory. That is where you need to start. I expect cacti.conf belongs in the document root for your cacti setup. First step: you can safely move it to somewhere safe. After that, your apache will start, but only with the example pages, I suspect. Second step: review your cacti configuration/installation. Something seems to have gone really wrong with that.
Observation: Firewall setting needs changing , but dont know which one.
There is nothing wrong with the firewall, only local clients will connect to 127.0.0.1.
# ll /etc/apache2/vhosts.d/ total 24 -rw-r--r-- 1 root root 2113 Nov 22 22:50 cacti.conf drwxr-xr-x 2 root root 80 Nov 23 00:54 conf.d
Uh, where did that one come from? I don't think vhosts.d has a conf.d directory, my apache servers certainly don't.
Two Questions: - Which firewall settings needs changing to allow 127.0.0.1 in firefox ?
None.
- How should should I call/reference "/etc/apache2/vhosts.d/cacti.conf" PHP script/mysql from the apeche2 /srv/www/htdocs/index.html file ?
First of all, it cannot remain in /etc/apache2/vhosts.d/, it will prevent apache from starting. I'm afraid I can't really help with your cacti setup. -- Per Jessen, Zürich (1.9°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 29 Nov 2012 07:58:23 +0100 Per Jessen <per@computer.org> wrote: <snipped>
First of all, it cannot remain in /etc/apache2/vhosts.d/, it will prevent apache from starting. I'm afraid I can't really help with your cacti setup.
This might help ... http://en.opensuse.org/Cacti If that doesn't do it, a search engine for "cacti.conf" reveals lots and lots of how-to's hth & regards, -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Carl Hartung
-
doiggl@velocitynet.com.au
-
Per Jessen