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 |
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. |
#
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. |
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 |
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 |
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/> 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:
If you are still facing the problem Check Quote:
if you are still facing the problem open file /etc/apache2/default-server.conf and change text Quote:
Quote:
Whenever you are making changes in configuration files, restart Apache to see the changes. |
All times are GMT -5. The time now is 05:26 PM. |