[opensuse] apache2 index.html and DocumentRoot questions
Hello, On http://127.0.0.1/ the shows error[1] Question: How do I get the browser to show the index.html content ? What needs changing ? and how is the display location set ? Thanks Glenn - I have these rpms installed # rpm -qa |grep -i apache2 |sort apache2-2.4.7-3.2.x86_64 apache2-doc-2.4.6-6.19.2.noarch apache2-example-pages-2.4.6-6.19.2.x86_64 apache2-mod_php5-5.4.20-4.1.x86_64 apache2-prefork-2.4.7-3.2.x86_64 apache2-utils-2.4.6-6.19.2.x86_64 /srv/www/htdocs/index.html shows: # cat /srv/www/htdocs/index.html <html><body><h1>It works!</h1></body></html> # 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-cache: using_defaults Mutex default: dir="/run/" mechanism=default Mutex mpm-accept: using_defaults Mutex ssl-stapling: using_defaults PidFile: "/run/httpd.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="wwwrun" id=30 Group: name="www" id=8 [1] http://127.0.0.1/ Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster. Error 403 127.0.0.1 Apache/2.4.7 (Linux/SUSE) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
doiggl@velocitynet.com.au wrote:
Hello,
On http://127.0.0.1/ the shows error[1]
Question: How do I get the browser to show the index.html content ? What needs changing ? and how is the display location set ?
It is usually in the default config, but you can set the default document using the "DirectoryIndex" statement: DirectoryIndex index index.html This belongs in your vhosts config or in .htaccess -- Per Jessen, Zürich (14.5°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/29/2014 04:57 PM, doiggl@velocitynet.com.au wrote:
http://127.0.0.1/ Access forbidden!
It's always a good idea to look into the Apache logs. Maybe there's a hint there. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, The /var/log/apache2/error_log shows: # cat /var/log/apache2/error_log [Sat May 03 00:25:06.088109 2014] [ssl:warn] [pid 25268] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Sat May 03 00:25:06.124867 2014] [mpm_prefork:notice] [pid 25268] AH00163: Apache/2.4.7 (Linux/SUSE) OpenSSL/1.0.1e PHP/5.4.20 configured -- resuming normal operations [Sat May 03 00:25:06.124942 2014] [core:notice] [pid 25268] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D FOREGROUND' [Sat May 03 00:25:09.657046 2014] [mpm_prefork:notice] [pid 25268] AH00170: caught SIGWINCH, shutting down gracefully [Sat May 03 00:25:09.907504 2014] [ssl:warn] [pid 25455] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Sat May 03 00:25:09.945494 2014] [mpm_prefork:notice] [pid 25455] AH00163: Apache/2.4.7 (Linux/SUSE) OpenSSL/1.0.1e PHP/5.4.20 configured -- resuming normal operations [Sat May 03 00:25:09.945569 2014] [core:notice] [pid 25455] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D FOREGROUND' # ll /srv/www/htdocs total 16 -rw-r--r-- 1 wwwrun www 302 Mar 13 2006 favicon.ico drwxr-xr-x 2 wwwrun www 208 Apr 15 05:20 gif -rw-r--r-- 1 wwwrun www 45 Jun 12 2007 index.html -rw-r--r-- 1 wwwrun www 2356 Sep 28 2013 info2html.css -rw-r--r-- 1 wwwrun www 26 Apr 4 21:02 robots.txt This is puzzzling, What have I missed ? --Glenn firefox http://127.0.0.1/ Gets error: Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster. Error 403 127.0.0.1 Apache/2.4.7 (Linux/SUSE) # Settings used: # httpd2 -S AH00557: httpd2: apr_sockaddr_info_get() failed for test.site AH00558: httpd2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message 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 # cat /etc/apache2/default-server.conf|grep -v "#" DocumentRoot "/srv/www/htdocs" <Directory "/srv/www/htdocs"> Options None AllowOverride None Require all granted </Directory> Alias /icons/ "/usr/share/apache2/icons/" <Directory "/usr/share/apache2/icons"> Options Indexes MultiViews AllowOverride None Require all granted </Directory> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/" <Directory "/srv/www/cgi-bin"> AllowOverride None Options +ExecCGI -Includes Require all granted </Directory> <IfModule mod_userdir.c> UserDir public_html Include /etc/apache2/mod_userdir.conf </IfModule> IncludeOptional /etc/apache2/conf.d/*.conf IncludeOptional /etc/apache2/conf.d/apache2-manual?conf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/02/2014 04:37 PM, doiggl@velocitynet.com.au wrote:
# cat /var/log/apache2/error_log
hmm, I can't see anything strange there. Does the 403 error show up in the /var/log/apache2/error_log? Are there any other logfiles configured in /etc/apache2/vhosts.d/cacti.conf? Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, 02 May 2014 17:19:09 +0200, Bernhard Voelker <mail@bernhard-voelker.de> wrote:
On 05/02/2014 04:37 PM, doiggl@velocitynet.com.au wrote:
# cat /var/log/apache2/error_log
hmm, I can't see anything strange there. Does the 403 error show up in the /var/log/apache2/error_log? Are there any other logfiles configured in /etc/apache2/vhosts.d/cacti.conf?
Have a nice day, Berny
Hello, # grep -i 403 /var/log/apache2/error_log So no 403 # 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> and # cat /var/log/apache2/cacti-error_log [Thu Apr 24 00:45:32.367595 2014] [authz_core:error] [pid 13518] [client 127.0.0.1:56544] AH01630: client denied by server configuration: /srv/www/cacti/cacti [Wed Apr 30 00:23:22.497009 2014] [authz_core:error] [pid 962] [client 127.0.0.1:45990] AH01630: client denied by server configuration: /srv/www/cacti/ [Wed Apr 30 00:24:45.636954 2014] [authz_core:error] [pid 2295] [client 127.0.0.1:46003] AH01630: client denied by server configuration: /srv/www/cacti/ [Wed Apr 30 00:24:46.787689 2014] [authz_core:error] [pid 2295] [client 127.0.0.1:46003] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 15:26:20.229460 2014] [authz_core:error] [pid 1045] [client ::1:53670] AH01630: client denied by server configuration: /srv/www/cacti/wordpress, referer: http://rauhmaru.blogspot.com.au/2010/02/cacti-instalacao-e-configuracao-no.h... [Fri May 02 15:26:25.323695 2014] [authz_core:error] [pid 1045] [client ::1:53670] AH01630: client denied by server configuration: /srv/www/cacti/wordpress, referer: http://rauhmaru.blogspot.com.au/2010/02/cacti-instalacao-e-configuracao-no.h... [Fri May 02 18:31:43.939626 2014] [authz_core:error] [pid 8307] [client 127.0.0.1:44965] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 20:29:32.787956 2014] [authz_core:error] [pid 13686] [client 127.0.0.1:45683] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 23:34:31.232760 2014] [authz_core:error] [pid 21376] [client 127.0.0.1:45814] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 23:34:31.393348 2014] [authz_core:error] [pid 21376] [client 127.0.0.1:45814] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico [Fri May 02 23:34:31.398015 2014] [authz_core:error] [pid 21376] [client 127.0.0.1:45814] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico [Fri May 02 23:36:40.089457 2014] [authz_core:error] [pid 21859] [client 127.0.0.1:45827] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 23:36:40.202228 2014] [authz_core:error] [pid 21859] [client 127.0.0.1:45827] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico [Fri May 02 23:39:22.058856 2014] [authz_core:error] [pid 22326] [client 127.0.0.1:45839] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 23:39:22.166232 2014] [authz_core:error] [pid 22326] [client 127.0.0.1:45839] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico [Fri May 02 23:40:09.440337 2014] [authz_core:error] [pid 22789] [client 127.0.0.1:45851] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 23:40:09.551084 2014] [authz_core:error] [pid 22789] [client 127.0.0.1:45851] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico [Fri May 02 23:47:14.928276 2014] [authz_core:error] [pid 23532] [client 127.0.0.1:45868] AH01630: client denied by server configuration: /srv/www/cacti/ [Fri May 02 23:47:15.043732 2014] [authz_core:error] [pid 23532] [client 127.0.0.1:45868] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico [Sat May 03 00:06:50.849700 2014] [authz_core:error] [pid 24447] [client 127.0.0.1:45884] AH01630: client denied by server configuration: /srv/www/cacti/ [Sat May 03 00:06:50.965256 2014] [authz_core:error] [pid 24447] [client 127.0.0.1:45884] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico [Sat May 03 00:25:11.370432 2014] [authz_core:error] [pid 25473] [client 127.0.0.1:45923] AH01630: client denied by server configuration: /srv/www/cacti/ [Sat May 03 00:25:11.483720 2014] [authz_core:error] [pid 25473] [client 127.0.0.1:45923] AH01630: client denied by server configuration: /srv/www/cacti/favicon.ico --Glenn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Bernhard Voelker
-
doiggl@velocitynet.com.au
-
Per Jessen