HTTPS – The requested URL wasnot found on the server

Black_White
Člen | 6
+
0
-

Zdravim,
mam aplikaci ktera funguje na HTTP ve chvili kdy jsem zprovoznil HTTPS tak mi funguje jen prihlasovaci stranka ale nasledne presmerovani konci chybou The requested URL was not found.

mam Vlastni server RHEL 6.9 apach 2.2.15

nastaveni HTTP Vistual host

<VirtualHost *:80>
    ServerAdmin
    DocumentRoot /var/www/html/Automation/www/
    ServerName XXX
    <Directory "/var/www/html/Automation/www/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
            Order allow,deny
        Allow from all
    </Directory>
    ErrorLog /var/www/html/log/error.log
    CustomLog /var/www/html/log/access.log common
</VirtualHost>
sslo.conf je nastaven takto :
<VirtualHost *:443>
DocumentRoot "/var/www/html/Automation/www"

ErrorLog /var/www/html/log/error-ssl.log
TransferLog /var/www/html/log/access_ssl.log
LogLevel error
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite DEFAULT:!EXP:!SSLv2:!DES:!IDEA:!SEED:+3DES
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/html/Automation/www">
    SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

.htaccess

 Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html)

# disable directory listing
<IfModule mod_autoindex.c>
        Options -Indexes
</IfModule>

# enable cool URL
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /www

        # use HTTPS
        RewriteCond %{HTTPS} !on
        RewriteRule .? https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
        RewriteLog "/var/log/httpd/rewrite.log"
        RewriteLogLevel 3

        # prevents files starting with dot to be viewed by browser
        RewriteRule /\.|^\.(?!well-known/) - [F]

        # front controller
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz|map)$ index.php [L]
</IfModule>

# enable gzip compression
<IfModule mod_deflate.c>
        <IfModule mod_filter.c>
                AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml
        </IfModule>
</IfModule>

Pouzivam Nette Sandbox a predefinouvanou RouteFacotry

<?php

namespace App;

use Nette;
use Nette\Application\Routers\RouteList;
use Nette\Application\Routers\Route;


class RouterFactory
{
        use Nette\StaticClass;

        /**
         * @return Nette\Application\IRouter
         */
        public static function createRouter()
        {
                Route::$defaultFlags = Route::SECURED;
                $router = new RouteList;
                $router[] = new Route('<presenter>/<action>', 'Sign:default');
                return $router;
        }

}
?>

poradi mi nekdo co s tim ?

Editoval Black_White (8. 8. 2017 16:20)

David Matějka
Moderator | 6445
+
0
-

mas zapnuty mod rewrite?

rkor
Člen | 62
+
0
-

Zkus ještě přidat do ssl.conf do sekce <Directory> AllowOverride all

<Directory "/var/www/html/Automation/www">
    SSLOptions +StdEnvVars
    AllowOverride All
</Directory>
Black_White
Člen | 6
+
0
-

@rkor
You are da man.

ano AllowOverride All
vyresilo problem!!!
Moc dekuji!!!