[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"
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
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
participants (3)
-
Bernhard Voelker
-
doiggl@velocitynet.com.au
-
Per Jessen