[opensuse] Apache does not work
I have recently installed openSuSE 13.2 on my new notebook (an Asus F555LF-XO334D, but I don't think that matters). My installation also includes apache2 and php5. Now, having enabled and started apache2 with YaST's Service Manager, the only response I get when invoking http://localhost/ in a browser is a page that says: ****************************************************************** 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 403r localhost Apache ****************************************************************** But Apache's DocumentRoot is world-wide readable: drwxr-xr-x 3 root root 4096 May 3 21:19 /srv/www/htdocs/ I exclude the hypothesis that Apache uses a different DocumentRoot since the entry DocumentRoot "/srv/www/htdocs" occurs in all these three configuration files: /etc/apache2/default-server.conf, /etc/apache2/default-vhost.conf and /etc/apache2/default-vhost-ssl.conf What can I do to make Apache work correctly? Thanks in advance for your help. Regard, Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Wolfgang Mueller wrote:
I have recently installed openSuSE 13.2 on my new notebook (an Asus F555LF-XO334D, but I don't think that matters). My installation also includes apache2 and php5.
Now, having enabled and started apache2 with YaST's Service Manager, the only response I get when invoking http://localhost/ in a browser is a page that says:
****************************************************************** 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 403r localhost Apache ******************************************************************
Actually, that proves that Apache _does_ work :-) You have two options - a) add an index document (index.html for instance) or b) allow directory listing for the directory: "options +indexes" -- Per Jessen, Zürich (10.3°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/05/16 10:25, Per Jessen wrote:
Wolfgang Mueller wrote:
[...] the only response I get when invoking http://localhost/ in a browser is a page that says:
****************************************************************** Access forbidden! [...] ******************************************************************
Actually, that proves that Apache _does_ work :-) You have two options -
a) add an index document (index.html for instance) or b) allow directory listing for the directory: "options +indexes"
I made a file /srv/www/htdocs/index.html with this content:
******************************************************************
/home/srv/wolfgang/arianna 205>cat index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>Test</title>
</head><body>
<b>This is a test</b>
</body></html>
******************************************************************
and now, when invoking http://localhost/ in a browser, I get:
This is a testoo
So indeed, Apache _does_ work, as you already stated. But my problem
is that /srv/www/htdocs/ contains two links to directories, and
Apache does not follow them. I know this problems from former
Versions of Apache. But in those good old days the solution was
making a file named /etc/apache2/httpd.conf.local with this content:
******************************************************************
<Directory />
Options FollowSymLinks +Multiviews
</Directory>
Wolfgang Mueller wrote:
On 05/05/16 10:25, Per Jessen wrote:
Wolfgang Mueller wrote:
[...] the only response I get when invoking http://localhost/ in a browser is a page that says:
****************************************************************** Access forbidden! [...] ******************************************************************
Actually, that proves that Apache _does_ work :-) You have two options -
a) add an index document (index.html for instance) or b) allow directory listing for the directory: "options +indexes"
I made a file /srv/www/htdocs/index.html with this content:
****************************************************************** /home/srv/wolfgang/arianna 205>cat index.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><title>Test</title> </head><body> <b>This is a test</b> </body></html> ******************************************************************
and now, when invoking http://localhost/ in a browser, I get: This is a testoo
So indeed, Apache _does_ work, as you already stated. But my problem is that /srv/www/htdocs/ contains two links to directories, and Apache does not follow them. I know this problems from former Versions of Apache. But in those good old days the solution was making a file named /etc/apache2/httpd.conf.local with this content:
****************************************************************** <Directory /> Options FollowSymLinks +Multiviews </Directory>
Options Indexes FollowSymLinks +Includes MultiViews </Directory> DirectoryIndex index.html index.htm index.php ****************************************************************** But this does not work any more. After I have replaced APACHE_CONF_INCLUDE_FILES="" by APACHE_CONF_INCLUDE_FILES="/etc/apache2/httpd.conf.local", restarting Apache failed with a long error message that cannot be copied. So I can only give you a summary:
Syntax error on line 2 of /etc/apache2/httpd.conf.local". Either all option must start with + or - or no option may.
But, as you see above, Multiviews is preceeded by a + in line 2. So, please help me to understand the error message.
All options need a plus or a minus, so:
<Directory />
Options +FollowSymLinks +Multiviews
</Directory>
Have a nice holiday (Auffahrt)!
You too! Sofar it's looking great - clear blue sky, temperature is rising. -- Per Jessen, Zürich (14.3°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/05/16 13:18, Per Jessen wrote:
Wolfgang Mueller wrote:
[...] All options need a plus or a minus, so:
<Directory /> Options +FollowSymLinks +Multiviews </Directory>
Options +Indexes +FollowSymLinks +Includes +MultiViews </Directory>
That helped - thanks a lot, Per! Now, there only remains the problem of submitting parameters to php. But, being this a new topic, I will put the question in a new thread. Bye, Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/05/2016 06:36 AM, Wolfgang Mueller wrote:
and now, when invoking http://localhost/ in a browser, I get: This is a testoo
I have similar and it says It Works! in big bold letters :-)
So indeed, Apache _does_ work, as you already stated. But my problem is that /srv/www/htdocs/ contains two links to directories, and Apache does not follow them.
Part of your problem, I think, is that you are opening the wrong
'place'. I have real directories, no symlinks, under /srv
For example, I have owncloud installed at
/srv/www/htdocs/owncloud/
I access that with
http;//localhost/owncloud
To make this work, I have in
/etc/apache2/conf.d/owncloud.conf:
the following (and a bit more, but this is the key part)
Alias /owncloud "/srv/www/htdocs/owncloud/"
Am 05.05.2016 um 10:10 schrieb Wolfgang Mueller:
I have recently installed openSuSE 13.2 on my new notebook (an Asus F555LF-XO334D, but I don't think that matters). My installation also includes apache2 and php5.
Now, having enabled and started apache2 with YaST's Service Manager, the only response I get when invoking http://localhost/ in a browser is a page that says:
****************************************************************** 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 403r localhost Apache ******************************************************************
But Apache's DocumentRoot is world-wide readable: drwxr-xr-x 3 root root 4096 May 3 21:19 /srv/www/htdocs/
I exclude the hypothesis that Apache uses a different DocumentRoot since the entry DocumentRoot "/srv/www/htdocs" occurs in all these three configuration files: /etc/apache2/default-server.conf, /etc/apache2/default-vhost.conf and /etc/apache2/default-vhost-ssl.conf
What can I do to make Apache work correctly?
Thanks in advance for your help.
Regard, Wolfgang
is there a file in that directory? /srv/www/htdocs/ if not, then just add ahtml oder php to the foler? as alternative you can also install apache-example-pages via yast? which will add that sample file and then it says at http://localhost/ IT WORKS! greetings becki -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Admin Beckspaced
-
Anton Aylward
-
Per Jessen
-
Wolfgang Mueller