Hi Leute,
Ich verzweifel grad ein wenig an meiner Shopware-Installation unter ISPConfig.
Die Installation lief sauber durch, das Backend geht auch 1a. Nur wenn ich ins Frontend will, will mein Browser die shopware.php herunterladen, statt das sie auf dem Server ausgeführt wird und nach einstellung von rewrite http auf https kommt nur die nginX-Startseite…
nginX ist so eingestellt:
location ~ ^/(engine|files|templates|media/(archive|banner|image|music|pdf|unknown|video))/ {
rewrite ^/files/documents/.* /engine last;
location ~ \.(jpe?g|png|gif|css|js)$ {
expires 1M;
}
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
{FASTCGIPASS}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS $fastcgi_https;
fastcgi_param HTTP_AUTHORIZATION $http_authorization;
}
location / {
index index.html index.php shopware.php;
rewrite shopware.dll /shopware.php;
rewrite files/documents/.* /engine last;
#rewrite images/ayww/(.*) /images/banner/$1 last;
rewrite backend/media/(.*) /media/$1 last;
if (!-e $request_filename){
rewrite . /shopware.php last;
}
location ~ \.(jpe?g|png|gif|css|js)$ {
rewrite backend/media/(.*) /media/$1 last;
expires 1M;
}
}
location ~ \.(tpl|yml|ini)$ {
deny all;
}
location /install/ {
location /install/assets {
}
if (!-e $request_filename){
rewrite . /install/index.php last;
}
}
location /update/ {
location /update/assets {
}
location /update/templates {
}
if (!-e $request_filename){
rewrite . /update/index.php last;
}
}
location /recovery/install/ {
location /recovery/install/assets {
}
if (!-e $request_filename){
rewrite . /recovery/install/index.php last;
}
}
location /recovery/update/ {
location /recovery/update/assets {
}
if (!-e $request_filename){
rewrite . /recovery/update/index.php last;
}
}
location ~ ^/(logs|media/temp|bin|cache)/ {
deny all;
}
Langsam seh ich hier aus wie ein Questgeber in einem Rollenspiel… Leuchtende Fragezeichen über dem Schädel… Hat jemand eine Idee was ich noch machen kann?
@Husky110 schrieb:
und nach einstellung von rewrite http auf https kommt nur die nginX-Startseite…
Das hört sich danach an, als ob Dein Vhost nicht auf https hört, sondern nur auf http. Hast Du denn SSL aktiviert für die Website?
Timme Hosting - schnelles nginx-Hosting
www.timmehosting.de
Heyho,
Japp - SSL ist aktiv. Wie gesagt. Backend geht 1a. Nur das Frontend komm nich…
Kannst Du mal die komplette Vhost-Konfiguration posten (findest Du unter /etc/nginx/sites-enabled/)?
Timme Hosting - schnelles nginx-Hosting
www.timmehosting.de
Klar (etwas anonymisiert), hier:
server {
listen :80;
listen []:80;
listen :443 ssl;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
listen []:443 ssl;
ssl_certificate /var/www/clients/client4/web7/ssl/myshop.de-le.crt;
ssl_certificate_key /var/www/clients/client4/web7/ssl/myshop.de-le.key;
server_name myshop.de www.myshop.de;
root /var/www/myshop.de/web/;
if ($http_host ~* "^(myshop\.de|((?:\w+(?:-\w+)*\.)*)((?!www\.)\w+(?:-\w+)*)(\.myshop\.de))$") {
rewrite ^ $scheme://www.myshop.de$request_uri? permanent;
}
if ($scheme != "https") {
rewrite ^ https://$http_host$request_uri? permanent;
}
index index.html index.htm index.php index.cgi index.pl index.xhtml;
error_log /var/log/ispconfig/httpd/myshop.de/error.log;
access_log /var/log/ispconfig/httpd/myshop.de/access.log combined;
location ~ /\. {
deny all;
}
location ^~ /.well-known/acme-challenge/ {
access_log off;
log_not_found off;
root /usr/local/ispconfig/interface/acme/;
autoindex off;
index index.html;
try_files $uri $uri/ =404;
}
location = /favicon.ico {
log_not_found off;
access_log off;
expires max;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location /stats/ {
index index.html index.php;
auth_basic "Members Only";
auth_basic_user_file /var/www/clients/client4/web7/web//stats/.htpasswd_stats;
}
location ^~ /awstats-icon {
alias /usr/share/awstats/icon;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/lib/php7.2-fpm/web7.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS $fastcgi_https;
fastcgi_param HTTP_AUTHORIZATION $http_authorization;
}
location @php {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/lib/php7.2-fpm/web7.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location ~ ^/(engine|files|templates|media/(archive|banner|image|music|pdf|unknown|video))/ {
rewrite ^/files/documents/.* /engine last;
location ~ \.(jpe?g|png|gif|css|js)$ {
expires 1M;
}
}
location / {
index index.html index.php shopware.php;
rewrite shopware.dll /shopware.php;
rewrite files/documents/.* /engine last;
rewrite backend/media/(.*) /media/$1 last;
if (!-e $request_filename){
rewrite . /shopware.php last;
}
location ~ \.(jpe?g|png|gif|css|js)$ {
rewrite backend/media/(.*) /media/$1 last;
expires 1M;
}
}
location ~ \.(tpl|yml|ini)$ {
deny all;
}
location /install/ {
location /install/assets {
}
if (!-e $request_filename){
rewrite . /install/index.php last;
}
}
location /update/ {
location /update/assets {
}
location /update/templates {
}
if (!-e $request_filename){
rewrite . /update/index.php last;
}
}
location /recovery/install/ {
location /recovery/install/assets {
}
if (!-e $request_filename){
rewrite . /recovery/install/index.php last;
}
}
location /recovery/update/ {
location /recovery/update/assets {
}
if (!-e $request_filename){
rewrite . /recovery/update/index.php last;
}
}
location ~ ^/(logs|media/temp|bin|cache)/ {
deny all;
}
}
Hallo Leute,
Bisher noch keine Antwort und noch keine Besserung…
Push?
Grüße