Your result of our little server check

Alles, was nicht in die anderen Foren passt, kannst du hier loswerden.
Offe
Beiträge: 568
Registriert: 30. Aug 2007, 17:42

Re: Your result of our little server check

Beitrag von Offe »

Debian Jessie introduced Apache 2.4.10 as Webserver. Prior versions of Debian use Apache 2.2.x
XimeX
Developer
Beiträge: 1148
Registriert: 12. Jul 2015, 13:21
Wohnort: Austria

Re: Your result of our little server check

Beitrag von XimeX »

Could you look in the "apache2.conf" in /etc/apache2/apache2.conf if you find this:
AllowOverride None
It must be allowed to override the "RewriteRule"
Offe
Beiträge: 568
Registriert: 30. Aug 2007, 17:42

Re: Your result of our little server check

Beitrag von Offe »

in apache2.conf you can find AllowOverride None. Standard apache2.conf looks like

Code: Alles auswählen

# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

#<Directory /srv/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
#</Directory>
AllowOverride Rewrite Rule is not working, i was not able to start apache again after changing to this value:
H00526: Syntax error on line 166 of /etc/apache2/apache2.conf:
Illegal override option RewriteRule
There is an option AllowOverride All, also i changed the entry for directory /var/www to:

Code: Alles auswählen

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
Apache restart was successful, but then: Error 500

I had to enable Rewrite

Code: Alles auswählen

sudo a2enmod rewrite
Now all four checks are ok.

I checked api test on another 1und1 webserver: Error 500, so rewrite should not be allowed there.
XimeX
Developer
Beiträge: 1148
Registriert: 12. Jul 2015, 13:21
Wohnort: Austria

Re: Your result of our little server check

Beitrag von XimeX »

https://httpd.apache.org/docs/2.4/mod/c ... owoverride
maybe this is correct: "AllowOverride RewriteCond RewriteRule"
You have to set it in the right Directory section

Thomas-RCV said 1und1 works fine. mybe we have to look a little bit deeper

Edit: ok wait this is wrong. Hmmm... This is strange why RewriteRule is not allowed...
maybe this helps: https://httpd.apache.org/docs/2.4/mod/m ... ewriterule

Edit 2:
To enable the rewrite engine in this context, you need to set "RewriteEngine On" and "Options FollowSymLinks" must be enabled. If your administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewrite engine. This restriction is required for security reasons.
TenX
Beiträge: 54
Registriert: 11. Sep 2015, 13:22

Re: Your result of our little server check

Beitrag von TenX »

We have two sites hosted by http://www.justhost.com/ and all scenarios in the script come back with an OK. :)
Benutzeravatar
Thomas-RCV
Former team member
Beiträge: 786
Registriert: 1. Aug 2011, 15:06

Re: Your result of our little server check

Beitrag von Thomas-RCV »

Edited my test result for 1und1.

Please have a look above. The same issue like Offe has
XimeX
Developer
Beiträge: 1148
Registriert: 12. Jul 2015, 13:21
Wohnort: Austria

Re: Your result of our little server check

Beitrag von XimeX »

For "1und1.de" users:
Please try to add this on the beginning of the .htaccess file

Code: Alles auswählen

RewriteEngine on
RewriteBase /
https://hilfe-center.1und1.de/hosting/1 ... 92317.html
Offe
Beiträge: 568
Registriert: 30. Aug 2007, 17:42

Re: Your result of our little server check

Beitrag von Offe »

I found same article, but for me there was no solution.
XimeX
Developer
Beiträge: 1148
Registriert: 12. Jul 2015, 13:21
Wohnort: Austria

Re: Your result of our little server check

Beitrag von XimeX »

Ok then please try:

Code: Alles auswählen

RewriteEngine On
RewriteBase /
RewriteRule ^ /index.php [QSA,L]
Offe
Beiträge: 568
Registriert: 30. Aug 2007, 17:42

Re: Your result of our little server check

Beitrag von Offe »

With new configuration i have 404 for test 2a --> nothing works
XimeX
Developer
Beiträge: 1148
Registriert: 12. Jul 2015, 13:21
Wohnort: Austria

Re: Your result of our little server check

Beitrag von XimeX »

Please change the "RewriteBase":

Code: Alles auswählen

# .htaccess File: "/absolute/path/to/your/.htaccess/.htaccess"
RewriteBase /absolute/path/to/your/.htaccess/
Works for Thomas-RCV
Offe
Beiträge: 568
Registriert: 30. Aug 2007, 17:42

Re: Your result of our little server check

Beitrag von Offe »

With RewriteBase and absolute path, no solution

There seems to be something wrong, because if i do not use .htaccess file, i can test 2 a with url/api . With .htaccess file i have to use url/api/index.php
Benutzeravatar
Thomas-RCV
Former team member
Beiträge: 786
Registriert: 1. Aug 2011, 15:06

Re: Your result of our little server check

Beitrag von Thomas-RCV »

Hi Offe,

I had the same problems after changing several times the htaccess.
I also had to call an index.php in the root.
But it seems to me that the Server possibly was a Little bit "confused" on my active system.
With the current Version from Ximex it works now.

Maybe you can me send your link ... for testing

-Thomas
XimeX
Developer
Beiträge: 1148
Registriert: 12. Jul 2015, 13:21
Wohnort: Austria

Re: Your result of our little server check

Beitrag von XimeX »

@Thomas-RCV

It works without call the "api/index.php" itself it works with "api/" too
blombo
Beiträge: 1
Registriert: 13. Okt 2015, 20:26

Re: Your result of our little server check

Beitrag von blombo »

My webspace is hosted by http://goneo.de and all test results are ok.
Antworten