Hallo Danke für die schnelle Antwort.
Die Konfiguration ist wie folgt.
XXX.XXX.XXX.XXX – im Original steht die richtige Server IP
Nginx – Varnish – Apache
---- nginx konfiguration
server {
listen 443 ssl;
server_name myshop.de www.myshop.de;
access_log /var/log/nginx/domains/myshop.de.access_log;
error_log /var/log/nginx/domains/myshop.de.error_log;
ssl_certificate /etc/letsencrypt/live/myshop.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/myshop.de/privkey.pem;
location /
{
proxy_buffering on;
proxy_pass http://XXX.XXX.XXX.XXX:6081;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header Upgrade;
#include /etc/nginx/nginx-vhost-location.conf;
}
location @fallback
{
proxy_buffering on;
proxy_pass http://XXX.XXX.XXX.XXX:6081;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header Upgrade;
#include /etc/nginx/nginx-vhost-location.conf;
}
location ~* ^.+.(jpg|jpeg|gif|png|ico|svg|js|css|mp3|ogg|mpe?g|txt|mov|flv|wmv|swf|avi|zip|gz|bz2?|rar|pdf|doc|psd|ttf)$
{
expires 365d;
root /var/www/html/myshop.de;
error_page 404 = @fallback;
}
}
------ varnish.params Auschnitt
Main configuration file. You probably want to change it.
VARNISH_VCL_CONF=/etc/varnish/default.vcl
VARNISH_LISTEN_ADDRESS=192.168.1.5
VARNISH_LISTEN_PORT=6081
Admin interface listen address and port
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
VARNISH_ADMIN_LISTEN_PORT=6082
User and group for the varnishd worker processes
VARNISH_USER=varnish
VARNISH_GROUP=varnish
— Apache httpd.conf
Listen 8080
myshop /var/www/html/myshop.de
PORT 8443 SSL CONFIG
*******************
DocumentRoot /var/www/html/myshop.de
ServerName myshop.de
ServerAlias www.myshop.de
ErrorLog “logs/domains/myshop.de.error_log”
CustomLog “logs/domains/myshop.de.access_log” combined
#Options +Includes +FollowSymLinks –Indexes
AllowOverride All
allow from all
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/myshop.de/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/myshop.de/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/myshop.de/chain.pem
PORT 80 REDIRECT CONFIG
***********************
DocumentRoot “/var/www/html/myshop.de”
ServerName myshop.de
ServerAlias www.myshop.de
ErrorLog “logs/domains/myshop.de.error_log”
CustomLog “logs/domains/myshop.de.access_log” combined
allow from all
AllowOverride All
Options +FollowSymLinks
Require all granted
#Redirect permanent / https://myshop.de/