LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-21-2014, 06:07 AM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Rep: Reputation: 26
I have some apache questions on opensuse 13.1


Hello,
I have some apache questions on opensuse 13.1:

I am trying to use this as a guide but no luck.
http://en.opensuse.org/Cacti

- I have a file /srv/www/cacti/include/config.php with these parameters in it:

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipasswd";
$database_port = "3306";

# cat /etc/apache2/default-server.conf | grep -i root
DocumentRoot "/srv/www/htdocs"

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 Apr 15 05:20 gif
-rw-r--r-- 1 root root 45 Jun 12 2007 index.html
-rw-r--r-- 1 root root 2356 Sep 28 2013 info2html.css
-rw-r--r-- 1 root root 26 Apr 4 21:02 robots.txt


Questions:

1. What do I replace index.html with, to call up a mysql/apache application with parameters shown in /srv/www/cacti/include/config.php as shown

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipasswd";
$database_port = "3306";

2. How do I call up the cacti application I believe it starts with http://127.0.0.1/

3. whats missing in the install guide ? http://en.opensuse.org/Cacti

4. Unsure if the DocumentRoot is set properly.

# httpd2 -S | grep -i root

ServerRoot: "/srv/www"
Main DocumentRoot: "/srv/www/htdocs"

# 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 Apr 15 05:20 gif
-rw-r--r-- 1 root root 45 Jun 12 2007 index.html
-rw-r--r-- 1 root root 2356 Sep 28 2013 info2html.css
-rw-r--r-- 1 root root 26 Apr 4 21:02 robots.txt

-not sure if this is needed.
# cat /srv/www/htdocs/index.html
<html><body><h1>It works!</h1></body></html>

Help appreciated.
--Glenn
 
Old 04-22-2014, 05:00 AM   #2
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Are you not able to open this link?
http://127.0.0.1/cacti/install
or
http://localhost/cacti/install
What does it show?

Are you trying to do database connections?
You can use config.php and define your database connection in it.

html files do not create database connections, you need a server side language for it and php can do it for you easily.

To run a web application, you need a web server, a database server (if needed for dynamic applications) - server side and a browser - client side.

Last edited by eklavya; 04-22-2014 at 05:02 AM.
 
Old 04-23-2014, 11:14 AM   #3
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
#
Hello,

http://127.0.0.1/cacti/install and http://localhost/cacti/install shows:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
127.0.0.1
Apache/2.4.7 (Linux/SUSE)

Also

# httpd2 -S
VirtualHost configuration:
*:80 127.0.0.1 (/etc/apache2/vhosts.d/cacti.conf:1)
ServerRoot: "/srv/www"
Main DocumentRoot: "/srv/www/htdocs"
Main ErrorLog: "/var/log/apache2/error_log"
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="wwwrun" id=30
Group: name="www" id=8

What do I check/change next ?
Thanks Glenn

#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 Apr 15 05:20 gif
-rw-r--r-- 1 root root 45 Jun 12 2007 index.html
-rw-r--r-- 1 root root 2356 Sep 28 2013 info2html.css
-rw-r--r-- 1 root root 26 Apr 4 21:02 robots.txt

# cat /var/log/apache2/error_log
[Thu Apr 24 00:44:45.874968 2014] [ssl:warn] [pid 13501] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Apr 24 00:44:45.908403 2014] [mpm_prefork:notice] [pid 13501] AH00163: Apache/2.4.7 (Linux/SUSE) OpenSSL/1.0.1e PHP/5.4.20 configured -- resuming normal operations
[Thu Apr 24 00:44:45.908478 2014] [core:notice] [pid 13501] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D FOREGROUND'

I will attach cacti file location listing- its a long list if it is allowed.
 
Old 04-24-2014, 09:29 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Modify the file cacti.conf and comment out “Deny from all” line, then restart Apache.

if you are still facing problem, give the access permission to /usr/share/cacti
 
Old 04-25-2014, 07:32 AM   #5
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
Hello,
I did not see a “Deny from all” line.
Which line is it that is being referred to ?
--Glenn

# cat /etc/apache2/vhosts.d/cacti.conf
<VirtualHost *:80>
ServerAdmin rauhmaru@opensuse.org
ServerName 127.0.0.1
DocumentRoot /srv/www/cacti/
ErrorLog /var/log/apache2/cacti-error_log
CustomLog /var/log/apache2/cacti-access_log combined
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
<IfModule mod_userdir.c>
UserDir public_html
Include /etc/apache2/mod_userdir.conf
</IfModule>
<Directory " /srv/www/cacti">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

# httpd2 -S
VirtualHost configuration:
*:80 127.0.0.1 (/etc/apache2/vhosts.d/cacti.conf:1)
ServerRoot: "/srv/www"
Main DocumentRoot: "/srv/www/htdocs"
Main ErrorLog: "/var/log/apache2/error_log"
Mutex mpm-accept: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/" mechanism=default
PidFile: "/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="wwwrun" id=30
Group: name="www" id=8
 
Old 04-26-2014, 01:59 AM   #6
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Did you not find the file in /etc/httpd/conf.d/cacti.conf
Here you will get
Code:
Alias /cacti /usr/share/cacti

<Directory /usr/share/cacti/>
Order Deny,Allow
Deny from all
</Directory>
Change it into

<Directory /usr/share/cacti/>
AllowOverride None
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory> [/CODE]

If you are still facing the problem. Open the apache configuration file and find
Quote:
<Directory />
Options Indexes
AllowOverride None
Order deny,allow
Allow from all
</Directory>
This directive should not be deny from all.

If you are still facing the problem
Check
Quote:
ls -l /srv/www/htdocs/
Is the directory has sufficient permission to access

if you are still facing the problem
open file /etc/apache2/default-server.conf
and change text
Quote:
Options None
to
Quote:
Options All
Restart apache.

Whenever you are making changes in configuration files, restart Apache to see the changes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about OpenSUSE jk07 SUSE / openSUSE 10 07-14-2012 06:27 PM
Hello.. I have 3 questions about OpenSuSE 10.2 .. :) ivangt Linux - Newbie 6 09-29-2007 03:52 AM
evdev questions for openSUSE 10.2 soldier228 Linux - Software 1 03-22-2007 10:14 PM
Some questions about OpenSUSE 10.0 RC1 koyi SUSE / openSUSE 5 09-24-2005 07:42 AM
Newbie OpenSuSE questions juyce SUSE / openSUSE 1 09-18-2005 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration