Anzeige:
Ergebnis 1 bis 7 von 7

Thema: nginx location Eintrag funktioniert nicht

  1. #1
    Registrierter Benutzer Avatar von schani
    Registriert seit
    Jan 2003
    Ort
    Moosburg
    Beiträge
    368

    Question nginx location Eintrag funktioniert nicht

    Hallo zusammen,
    ich habe bei einem Webserver das Problem das ein location Eintrag nicht greift.
    In einer zentralen conf Datei (/etc/nginx/global.conf) werden mehrere reverse Proxi Einträge gesetzt und in allen Domains auf dem Server in die domain config datei includiert. So das z.B. auf allen vom nginx verwalteten Domains ein anhang wie z.b. www.domain1.de/rspamd/ www.domain2.de/netdata/ umgeleitet wird.
    Ich möchte das auch auf zentrale Dienste die keinen reverse Proxy brauchen anwenden.
    Ich hab ein roundcubemail unter /var/www/roundcubemail liegen, den ich über www.irgendeinedomain.de/webmail aufrufen möchte.

    Leider nimmt mir nginx folgenden Eintrag nicht an:

    Code:
    location /webmail/ {
    	root   /var/www/roundcubemail;
        index  index.php index.html index.htm;
    }
    Die Einträge in der selben config Datei funktionieren aber.
    Code:
    location /.well-known/acme-challenge {
    	alias /var/www/froxlor/.well-known/acme-challenge;
    
    	location ~ /.well-known/acme-challenge/(.*) {
    		default_type text/plain;
    	}
    }
    
    
    location /rspamd/ {
           proxy_pass       http://localhost:11334/;
    
           proxy_set_header Host      $host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For "";
    }
    
    location /netdata/ {
           proxy_pass       http://localhost:19999/;
    
           proxy_set_header Host      $host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For "";
    }
    Bei aufrufen der www.domain.de/webmail bekomme ich ein 404 zurück.
    Woran kann das liegen?
    Besten Dank für Tipps
    Christian

  2. #2
    Registrierter Benutzer Avatar von ThorstenHirsch
    Registriert seit
    Nov 2002
    Beiträge
    6.558
    Die Berechtigungen sind in Ordnung? Mal /var/www/roundcubemail mit /var/www/froxlor vergleichen.
    ¡Nuestro amigo... el Computador!

  3. #3
    Registrierter Benutzer Avatar von schani
    Registriert seit
    Jan 2003
    Ort
    Moosburg
    Beiträge
    368
    Ja, hab ich geprüft.

  4. #4
    Registrierter Benutzer
    Registriert seit
    Dec 2003
    Ort
    Dettenhausen
    Beiträge
    22.061
    welche URL (exakt) rufst Du auf? In der Konfig aktuell wäre der trailing-Slash wichtig, sonst sieht sich die Nginx-Konfig an der Stelle nicht für zuständig.

    Sprich:
    * https://domain/webmail/ -> sollte greifen
    * https://domain/webmail -> greift nicht.
    Ich bin root - ich darf das.

  5. #5
    Registrierter Benutzer Avatar von schani
    Registriert seit
    Jan 2003
    Ort
    Moosburg
    Beiträge
    368
    Nein das ist es leider nicht. Greifen beide nicht.

  6. #6
    Registrierter Benutzer
    Registriert seit
    Dec 2003
    Ort
    Dettenhausen
    Beiträge
    22.061
    dann poste bitte die komplette Konfig und den relevanten Teil der Logfiles.
    Ich bin root - ich darf das.

  7. #7
    Registrierter Benutzer Avatar von schani
    Registriert seit
    Jan 2003
    Ort
    Moosburg
    Beiträge
    368
    Ich hab mal ein nginx -T gemacht und die meisten identischen Domains (135) rausgelöscht, weil sonst zu viel wird.

    ### Hier gehts los #####
    Code:
    # configuration file /etc/nginx/nginx.conf:
    user www-data;
    worker_processes 4;
    pid /var/run/nginx.pid;
    
    events {
    	worker_connections 768;
    	# multi_accept on;
    }
    
    http {
    
    	##
    	# Basic Settings
    	##
    
    	sendfile on;
    	tcp_nopush on;
    	tcp_nodelay on;
    	keepalive_timeout 65;
    	types_hash_max_size 2048;
    	# server_tokens off;
    
    	# server_names_hash_bucket_size 64;
    	# server_name_in_redirect off;
    
    	include /etc/nginx/mime.types;
    	default_type application/octet-stream;
    
    	##
    	# Logging Settings
    	##
    
    	access_log /var/log/nginx/access.log;
    	error_log /var/log/nginx/error.log;
    
    	##
    	# Gzip Settings
    	##
    
    	gzip on;
    	gzip_disable "msie6";
    
    	# gzip_vary on;
    	# gzip_proxied any;
    	# gzip_comp_level 6;
    	# gzip_buffers 16 8k;
    	# gzip_http_version 1.1;
    	# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    
    	##
    	# nginx-naxsi config
    	##
    	# Uncomment it if you installed nginx-naxsi
    	##
    
    	#include /etc/nginx/naxsi_core.rules;
    
    	##
    	# nginx-passenger config
    	##
    	# Uncomment it if you installed nginx-passenger
    	##
    
    	#passenger_root /usr;
    	#passenger_ruby /usr/bin/ruby;
    
    	##
    	# Virtual Host Configs
    	##
    
    	include /etc/nginx/conf.d/*.conf;
    	include /etc/nginx/sites-enabled/*;
    	include /etc/nginx/globale_domains.conf;
    }
    
    
    #mail {
    #	# See sample authentication script at:
    #	# http://wiki.nginx.org/ImapAuthentica...pachePhpScript
    #
    #	# auth_http localhost/auth.php;
    #	# pop3_capabilities "TOP" "USER";
    #	# imap_capabilities "IMAP4rev1" "UIDPLUS";
    #
    #	server {
    #		listen     localhost:110;
    #		protocol   pop3;
    #		proxy      on;
    #	}
    #
    #	server {
    #		listen     localhost:143;
    #		protocol   imap;
    #		proxy      on;
    #	}
    #}
    # configuration file /etc/nginx/mime.types:
    
    types {
        text/html                             html htm shtml;
        text/css                              css;
        text/xml                              xml;
        image/gif                             gif;
        image/jpeg                            jpeg jpg;
        application/javascript                js;
        application/atom+xml                  atom;
        application/rss+xml                   rss;
    
        text/mathml                           mml;
        text/plain                            txt;
        text/vnd.sun.j2me.app-descriptor      jad;
        text/vnd.wap.wml                      wml;
        text/x-component                      htc;
    
        image/png                             png;
        image/tiff                            tif tiff;
        image/vnd.wap.wbmp                    wbmp;
        image/x-icon                          ico;
        image/x-jng                           jng;
        image/x-ms-bmp                        bmp;
        image/svg+xml                         svg svgz;
        image/webp                            webp;
    
        application/font-woff                 woff;
        application/java-archive              jar war ear;
        application/json                      json;
        application/mac-binhex40              hqx;
        application/msword                    doc;
        application/pdf                       pdf;
        application/postscript                ps eps ai;
        application/rtf                       rtf;
        application/vnd.apple.mpegurl         m3u8;
        application/vnd.ms-excel              xls;
        application/vnd.ms-fontobject         eot;
        application/vnd.ms-powerpoint         ppt;
        application/vnd.wap.wmlc              wmlc;
        application/vnd.google-earth.kml+xml  kml;
        application/vnd.google-earth.kmz      kmz;
        application/x-7z-compressed           7z;
        application/x-cocoa                   cco;
        application/x-java-archive-diff       jardiff;
        application/x-java-jnlp-file          jnlp;
        application/x-makeself                run;
        application/x-perl                    pl pm;
        application/x-pilot                   prc pdb;
        application/x-rar-compressed          rar;
        application/x-redhat-package-manager  rpm;
        application/x-sea                     sea;
        application/x-shockwave-flash         swf;
        application/x-stuffit                 sit;
        application/x-tcl                     tcl tk;
        application/x-x509-ca-cert            der pem crt;
        application/x-xpinstall               xpi;
        application/xhtml+xml                 xhtml;
        application/xspf+xml                  xspf;
        application/zip                       zip;
    
        application/octet-stream              bin exe dll;
        application/octet-stream              deb;
        application/octet-stream              dmg;
        application/octet-stream              iso img;
        application/octet-stream              msi msp msm;
    
        application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
        application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          xlsx;
        application/vnd.openxmlformats-officedocument.presentationml.presentation  pptx;
    
        audio/midi                            mid midi kar;
        audio/mpeg                            mp3;
        audio/ogg                             ogg;
        audio/x-m4a                           m4a;
        audio/x-realaudio                     ra;
    
        video/3gpp                            3gpp 3gp;
        video/mp2t                            ts;
        video/mp4                             mp4;
        video/mpeg                            mpeg mpg;
        video/quicktime                       mov;
        video/webm                            webm;
        video/x-flv                           flv;
        video/x-m4v                           m4v;
        video/x-mng                           mng;
        video/x-ms-asf                        asx asf;
        video/x-ms-wmv                        wmv;
        video/x-msvideo                       avi;
    }
    
    # configuration file /etc/nginx/sites-enabled/10_froxlor_ipandport_142.132.211.104.443.conf:
    # 10_froxlor_ipandport_142.132.211.104.443.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen    142.132.211.104:443 default_server ssl http2;
    	# Froxlor default vhost
    	server_name    kundenzenter.schani.com;
    	access_log     /var/log/nginx/access.log combined;
    	include /etc/nginx/acme.conf;
    	root     /var/www/froxlor/;
    	index    index.php index.html index.htm;
    
    	location / {
    	}
    	location = /lib/userdata.inc.php {
    	    deny all;
    	}
    	location ~ /(bin|cache|logs|tests|vendor) {
    	    deny all;
    	}
    	ssl_protocols TLSv1.2;
    	ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
    	ssl_prefer_server_ciphers off;
    	ssl_session_tickets on;
    	ssl_session_cache shared:SSL:10m;
    	ssl_certificate /etc/nginx/ssl/kundenzenter.schani.com.crt;
    	ssl_certificate_key /etc/nginx/ssl/kundenzenter.schani.com.key;
    	location ~ \.php {
    		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    		include /etc/nginx/fastcgi_params;
    		fastcgi_param SCRIPT_FILENAME $request_filename;
    		fastcgi_param PATH_INFO $fastcgi_path_info;
    		try_files $fastcgi_script_name =404;
    		fastcgi_param HTTPS on;
    		fastcgi_pass unix:/var/lib/nginx/fastcgi/4-froxlor.panel-kundenzenter.schani.com-php-fpm.socket;
    		fastcgi_index index.php;
    	}
    }
    
    
    # configuration file /etc/nginx/acme.conf:
    
    	location /webmail/ {
    
    		root   /var/www/roundcubemail;
    		index  index.php index.html index.htm;
    	}
    
    
    location /.well-known/acme-challenge {
    	alias /var/www/froxlor/.well-known/acme-challenge;
    
    	location ~ /.well-known/acme-challenge/(.*) {
    		default_type text/plain;
    	}
    }
    
    
    location /rspamd/ {
           proxy_pass       http://localhost:11334/;
    
           proxy_set_header Host      $host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For "";
    }
    
    location /netdata/ {
           proxy_pass       http://localhost:19999/;
    
           proxy_set_header Host      $host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For "";
    }
    
    
    # configuration file /etc/nginx/fastcgi_params:
    fastcgi_connect_timeout 65;
    fastcgi_send_timeout    180;
    fastcgi_read_timeout    180;
    
    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;
    
    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  HTTPS              $https if_not_empty;
    
    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
    
    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;
    
    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;
    # configuration file /etc/nginx/sites-enabled/10_froxlor_ipandport_142.132.211.104.80.conf:
    # 10_froxlor_ipandport_142.132.211.104.80.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen    142.132.211.104:80 default_server;
    	# Froxlor default vhost
    	server_name    kundenzenter.schani.com;
    	access_log     /var/log/nginx/access.log combined;
    	include /etc/nginx/acme.conf;
    	location / {
    		return 301 https://kundenzenter.schani.com$request_uri;
    	}
    }
    
    
    # configuration file /etc/nginx/sites-enabled/10_froxlor_ipandport_2a01.4f8.262.5004.2.443.conf:
    # 10_froxlor_ipandport_2a01.4f8.262.5004.2.443.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen    [2a01:4f8:262:5004::2]:443 default_server ssl http2;
    	# Froxlor default vhost
    	server_name    kundenzenter.schani.com;
    	access_log     /var/log/nginx/access.log combined;
    	include /etc/nginx/acme.conf;
    	root     /var/www/froxlor/;
    	index    index.php index.html index.htm;
    
    	location / {
    	}
    	location = /lib/userdata.inc.php {
    	    deny all;
    	}
    	location ~ /(bin|cache|logs|tests|vendor) {
    	    deny all;
    	}
    	ssl_protocols TLSv1.2;
    	ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
    	ssl_prefer_server_ciphers off;
    	ssl_session_tickets on;
    	ssl_session_cache shared:SSL:10m;
    	ssl_certificate /etc/nginx/ssl/kundenzenter.schani.com.crt;
    	ssl_certificate_key /etc/nginx/ssl/kundenzenter.schani.com.key;
    	location ~ \.php {
    		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    		include /etc/nginx/fastcgi_params;
    		fastcgi_param SCRIPT_FILENAME $request_filename;
    		fastcgi_param PATH_INFO $fastcgi_path_info;
    		try_files $fastcgi_script_name =404;
    		fastcgi_param HTTPS on;
    		fastcgi_pass unix:/var/lib/nginx/fastcgi/4-froxlor.panel-kundenzenter.schani.com-php-fpm.socket;
    		fastcgi_index index.php;
    	}
    }
    
    
    # configuration file /etc/nginx/sites-enabled/10_froxlor_ipandport_2a01.4f8.262.5004.2.80.conf:
    # 10_froxlor_ipandport_2a01.4f8.262.5004.2.80.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen    [2a01:4f8:262:5004::2]:80 default_server;
    	# Froxlor default vhost
    	server_name    kundenzenter.schani.com;
    	access_log     /var/log/nginx/access.log combined;
    	include /etc/nginx/acme.conf;
    	location / {
    		return 301 https://kundenzenter.schani.com$request_uri;
    	}
    }
    
    
    # configuration file /etc/nginx/sites-enabled/29_froxlor_normal_vhost_2016.wilde-strolche.de.conf:
    # 29_froxlor_normal_vhost_2016.wilde-strolche.de.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    # Customer deactivated and a docroot for deactivated users/domains hasn't been set.
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_normal_vhost_11.leicht.info.conf:
    # 35_froxlor_normal_vhost_11.leicht.info.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen 142.132.211.104:80;
    	listen [2a01:4f8:262:5004::2]:80;
    	server_name    11.leicht.info;
    	include /etc/nginx/acme.conf;
    	location / {
    		return 301 https://$host$request_uri;
    	}
    
    }
    
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_normal_vhost_2020.leicht.info.conf:
    # 35_froxlor_normal_vhost_2020.leicht.info.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen 142.132.211.104:80;
    	listen [2a01:4f8:262:5004::2]:80;
    	server_name    2020.leicht.info;
    	include /etc/nginx/acme.conf;
    	location / {
    		return 301 https://$host$request_uri;
    	}
    
    }
    
    
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_normal_vhost_cloud2.leicht.info.conf:
    # 35_froxlor_normal_vhost_cloud2.leicht.info.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen 142.132.211.104:80;
    	listen [2a01:4f8:262:5004::2]:80;
    	server_name    cloud2.leicht.info;
    	include /etc/nginx/acme.conf;
    	location / {
    		return 301 https://$host$request_uri;
    	}
    
    }
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_normal_vhost_erp.leicht.info.conf:
    # 35_froxlor_normal_vhost_erp.leicht.info.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen 142.132.211.104:80;
    	listen [2a01:4f8:262:5004::2]:80;
    	server_name    erp.leicht.info;
    	include /etc/nginx/acme.conf;
    	location / {
    		return 301 https://$host$request_uri;
    	}
    
    }
    
    
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_normal_vhost_helpdesk.leicht.info.conf:
    # 35_froxlor_normal_vhost_helpdesk.leicht.info.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server {
    	listen 142.132.211.104:80;
    	server_name helpdesk.leicht.info;
    	include /etc/nginx/acme.conf;
    	access_log /var/customers/logs/leicht-helpdesk.leicht.info-access.log combined;
    	error_log /var/customers/logs/leicht-helpdesk.leicht.info-error.log warn;
    	root /home/httpd/leicht/helpdesk.leicht.info/;
    	location / {
    		index index.php index.html index.htm;
    		try_files $uri $uri/ @rewrites;
    	}
    
    	location @rewrites {
    		rewrite ^ /index.php last;
    	}
    
    	location ^~ /awstats {
    		alias /home/httpd/leicht/awstats/helpdesk.leicht.info/;
    		auth_basic "Restricted Area";
    		auth_basic_user_file /etc/nginx/froxlor-htpasswd/10-1e27cede3578e1488ccef9ece9996eb9.htpasswd;
    	}
    
    	location ~ ^/awstats-icon/(.*)$ {
    		alias /usr/share/awstats/icon/$1;
    	}
    
    	location ~ ^(.+?\.php)(/.*)?$ {
    		try_files /e6a9ec5dd5c6a7441affa4f806987bfd.htm @php;
    	}
    
    	location @php {
    		try_files $1 =404;
    
    		include /etc/nginx/fastcgi_params;
    		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    		fastcgi_param SCRIPT_FILENAME $request_filename;
    		fastcgi_param PATH_INFO $2;
    		fastcgi_pass unix:/var/lib/nginx/fastcgi/4-leicht-helpdesk.leicht.info-php-fpm.socket;
    		fastcgi_index index.php;
    	}
    
    
    }
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_normal_vhost_schani.com.conf:
    # 35_froxlor_normal_vhost_schani.com.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server { 
    	listen 142.132.211.104:80;
    	listen [2a01:4f8:262:5004::2]:80;
    	server_name    schani.com www.schani.com;
    	include /etc/nginx/acme.conf;
    	location / {
    		return 301 https://$host$request_uri;
    	}
    
    }
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_normal_vhost_schani.de.conf:
    # 35_froxlor_normal_vhost_schani.de.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server {
    	listen 142.132.211.104:80;
    	listen [2a01:4f8:262:5004::2]:80;
    	server_name schani.de;
    	include /etc/nginx/acme.conf;
    	access_log /var/customers/logs/leicht-access.log combined;
    	error_log /var/customers/logs/leicht-error.log warn;
    	root /home/httpd/leicht/schani.de/;
    	location / {
    		index index.php index.html index.htm;
    		try_files $uri $uri/ @rewrites;
    	}
    
    	location @rewrites {
    		rewrite ^ /index.php last;
    	}
    
    	location ^~ /awstats {
    		alias /home/httpd/leicht/awstats/schani.de/;
    		auth_basic "Restricted Area";
    		auth_basic_user_file /etc/nginx/froxlor-htpasswd/10-1e27cede3578e1488ccef9ece9996eb9.htpasswd;
    	}
    
    	location ~ ^/awstats-icon/(.*)$ {
    		alias /usr/share/awstats/icon/$1;
    	}
    
    	location ~ ^(.+?\.php)(/.*)?$ {
    		try_files /06c17372b60f5327efa27dafed2d3ad2.htm @php;
    	}
    
    	location @php {
    		try_files $1 =404;
    
    		include /etc/nginx/fastcgi_params;
    		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    		fastcgi_param SCRIPT_FILENAME $request_filename;
    		fastcgi_param PATH_INFO $2;
    		fastcgi_pass unix:/var/lib/nginx/fastcgi/4-leicht-schani.de-php-fpm.socket;
    		fastcgi_index index.php;
    	}
    
    
    }
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_ssl_vhost_11.leicht.info.conf:
    # 35_froxlor_ssl_vhost_11.leicht.info.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server {
    	listen 142.132.211.104:443 ssl http2;
    	listen [2a01:4f8:262:5004::2]:443 ssl http2;
    	server_name 11.leicht.info;
    	ssl_protocols TLSv1.2;
    	ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
    	ssl_prefer_server_ciphers off;
    	ssl_session_tickets on;
    	ssl_session_cache shared:SSL:10m;
    	ssl_certificate /etc/ssl/froxlor_selfsigned.pem;
    	ssl_certificate_key /etc/ssl/froxlor_selfsigned.key;
    	add_header Strict-Transport-Security "max-age=0";
    	include /etc/nginx/acme.conf;
    	access_log /var/customers/logs/leicht-11.leicht.info-access.log combined;
    	error_log /var/customers/logs/leicht-11.leicht.info-error.log warn;
    	root /home/httpd/leicht/11.leicht.info/;
    	location / {
    		index index.php index.html index.htm;
    		try_files $uri $uri/ @rewrites;
    	}
    
    	location @rewrites {
    		rewrite ^ /index.php last;
    	}
    
    	location ^~ /awstats {
    		alias /home/httpd/leicht/awstats/11.leicht.info/;
    		auth_basic "Restricted Area";
    		auth_basic_user_file /etc/nginx/froxlor-htpasswd/10-1e27cede3578e1488ccef9ece9996eb9.htpasswd;
    	}
    
    	location ~ ^/awstats-icon/(.*)$ {
    		alias /usr/share/awstats/icon/$1;
    	}
    
    	location ~ ^(.+?\.php)(/.*)?$ {
    		try_files /37e3087d0ce1385a5ed81b65afb74c24.htm @php;
    	}
    
    	location @php {
    		try_files $1 =404;
    
    		include /etc/nginx/fastcgi_params;
    		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    		fastcgi_param SCRIPT_FILENAME $request_filename;
    		fastcgi_param PATH_INFO $2;
    		fastcgi_param HTTPS on;
    		fastcgi_pass unix:/var/lib/nginx/fastcgi/4-leicht-11.leicht.info-php-fpm.socket;
    		fastcgi_index index.php;
    	}
    
    
    }
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_ssl_vhost_cloud2.leicht.info.conf:
    # 35_froxlor_ssl_vhost_cloud2.leicht.info.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server {
    	listen 142.132.211.104:443 ssl http2;
    	listen [2a01:4f8:262:5004::2]:443 ssl http2;
    	server_name cloud2.leicht.info;
    	ssl_protocols TLSv1.2;
    	ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
    	ssl_prefer_server_ciphers off;
    	ssl_session_tickets on;
    	ssl_session_cache shared:SSL:10m;
    	ssl_certificate /etc/nginx/ssl/cloud2.leicht.info.crt;
    	ssl_certificate_key /etc/nginx/ssl/cloud2.leicht.info.key;
    	add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
    	ssl_stapling on;
    	ssl_stapling_verify on;
    	ssl_trusted_certificate /etc/nginx/ssl/cloud2.leicht.info.crt;
    	include /etc/nginx/acme.conf;
    	access_log /var/customers/logs/leicht-cloud2.leicht.info-access.log combined;
    	error_log /var/customers/logs/leicht-cloud2.leicht.info-error.log warn;
    	root /home/httpd/leicht/cloud2.leicht.info/;
    	location / {
    		index index.php index.html index.htm;
    		try_files $uri $uri/ @rewrites;
    	}
    
    	location @rewrites {
    		rewrite ^ /index.php last;
    	}
    
    	location ^~ /awstats {
    		alias /home/httpd/leicht/awstats/cloud2.leicht.info/;
    		auth_basic "Restricted Area";
    		auth_basic_user_file /etc/nginx/froxlor-htpasswd/10-1e27cede3578e1488ccef9ece9996eb9.htpasswd;
    	}
    
    	location ~ ^/awstats-icon/(.*)$ {
    		alias /usr/share/awstats/icon/$1;
    	}
    
    	location ~ ^(.+?\.php)(/.*)?$ {
    		try_files /94a73cd0ff4672a40a757314a8e92180.htm @php;
    	}
    
    	location @php {
    		try_files $1 =404;
    		include /etc/nginx/fastcgi_params;
    		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    		fastcgi_param SCRIPT_FILENAME $request_filename;
    		fastcgi_param PATH_INFO $2;
    		fastcgi_param HTTPS on;
    		fastcgi_pass unix:/var/lib/nginx/fastcgi/4-leicht-cloud2.leicht.info-php-fpm.socket;
    		fastcgi_index index.php;
    	}
    
    	client_max_body_size 5000M;
    	client_body_timeout 300s;
    	fastcgi_buffers 64 4K;
    	gzip on;
    	gzip_vary on;
    	gzip_comp_level 4;
    	gzip_min_length 256;
    	gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
    	gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
    	client_body_buffer_size 512k;
    	location ^~ /.well-known {
    		location = /.well-known/carddav {
    			return 301 /remote.php/dav/;
    		}
    
    		location = /.well-known/caldav {
    			return 301 /remote.php/dav/;
    		}
    
    		location /.well-known/acme-challenge {
    			try_files $uri $uri/ =404;
    		}
    
    		location /.well-known/pki-validation {
    			try_files $uri $uri/ =404;
    		}
    
    		return 301 /index.php$request_uri;
    	}
    
    }
    
    
    # configuration file /etc/nginx/sites-enabled/35_froxlor_ssl_vhost_schani.de.conf:
    # 35_froxlor_ssl_vhost_schani.de.conf
    # Created 24.04.2023 11:22
    # Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.
    
    server {
    	listen 142.132.211.104:443 ssl;
    	listen [2a01:4f8:262:5004::2]:443 ssl;
    	server_name schani.de;
    	ssl_protocols TLSv1.2;
    	ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
    	ssl_prefer_server_ciphers off;
    	ssl_session_tickets on;
    	ssl_session_cache shared:SSL:10m;
    	ssl_certificate /etc/nginx/ssl/schani.de.crt;
    	ssl_certificate_key /etc/nginx/ssl/schani.de.key;
    	add_header Strict-Transport-Security "max-age=0";
    	ssl_stapling on;
    	ssl_stapling_verify on;
    	ssl_trusted_certificate /etc/nginx/ssl/schani.de.crt;
    	include /etc/nginx/acme.conf;
    	access_log /var/customers/logs/leicht-access.log combined;
    	error_log /var/customers/logs/leicht-error.log warn;
    	root /home/httpd/leicht/schani.de/;
    	location / {
    		index index.php index.html index.htm;
    		try_files $uri $uri/ @rewrites;
    	}
    
    	location @rewrites {
    		rewrite ^ /index.php last;
    	}
    
    	location ^~ /awstats {
    		alias /home/httpd/leicht/awstats/schani.de/;
    		auth_basic "Restricted Area";
    		auth_basic_user_file /etc/nginx/froxlor-htpasswd/10-1e27cede3578e1488ccef9ece9996eb9.htpasswd;
    	}
    
    	location ~ ^/awstats-icon/(.*)$ {
    		alias /usr/share/awstats/icon/$1;
    	}
    
    	location ~ ^(.+?\.php)(/.*)?$ {
    		try_files /06c17372b60f5327efa27dafed2d3ad2.htm @php;
    	}
    
    	location @php {
    		try_files $1 =404;
    
    		include /etc/nginx/fastcgi_params;
    		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    		fastcgi_param SCRIPT_FILENAME $request_filename;
    		fastcgi_param PATH_INFO $2;
    		fastcgi_param HTTPS on;
    		fastcgi_pass unix:/var/lib/nginx/fastcgi/4-leicht-schani.de-php-fpm.socket;
    		fastcgi_index index.php;
    	}
    
    
    }
    
    
    
    # configuration file /etc/nginx/sites-enabled/default:
    ##
    # You should look at the following URL's in order to grasp a solid understanding
    # of Nginx configuration files in order to fully unleash the power of Nginx.
    # https://www.nginx.com/resources/wiki/start/
    # https://www.nginx.com/resources/wiki...nfig_pitfalls/
    # https://wiki.debian.org/Nginx/DirectoryStructure
    #
    # In most cases, administrators will remove this file from sites-enabled/ and
    # leave it as reference inside of sites-available where it will continue to be
    # updated by the nginx packaging team.
    #
    # This file will automatically load configuration files provided by other
    # applications, such as Drupal or Wordpress. These applications will be made
    # available underneath a path with that package name, such as /drupal8.
    #
    # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
    ##
    
    # Default server configuration
    #
    server {
    	listen 80 default_server;
    	listen [::]:80 default_server;
    
    	# SSL configuration
    	#
    	# listen 443 ssl default_server;
    	# listen [::]:443 ssl default_server;
    	#
    	# Note: You should disable gzip for SSL traffic.
    	# See: https://bugs.debian.org/773332
    	#
    	# Read up on ssl_ciphers to ensure a secure configuration.
    	# See: https://bugs.debian.org/765782
    	#
    	# Self signed certs generated by the ssl-cert package
    	# Don't use them in a production server!
    	#
    	# include snippets/snakeoil.conf;
    
    	root /var/www;
    
    	# Add index.php to the list if you are using PHP
    	index index.php index.html index.htm index.nginx-debian.html;
    
    	server_name _;
    
    	location / {
    		# First attempt to serve request as file, then
    		# as directory, then fall back to displaying a 404.
    		try_files $uri $uri/ =404;
    		autoindex on;
    	}
    
    	# pass PHP scripts to FastCGI server
    	#
    	location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        }
    
    	# deny access to .htaccess files, if Apache's document root
    	# concurs with nginx's one
    	#
    	location ~ /\.ht {
    		deny all;
    	}
    }
    
    
    # Virtual Host configuration for example.com
    #
    # You can move that to a different file under sites-available/ and symlink that
    # to sites-enabled/ to enable it.
    #
    #server {
    #	listen 80;
    #	listen [::]:80;
    #
    #	server_name example.com;
    #
    #	root /var/www/example.com;
    #	index index.html;
    #
    #	location / {
    #		try_files $uri $uri/ =404;
    #	}
    #}
    
    # configuration file /etc/nginx/snippets/fastcgi-php.conf:
    # regex to split $uri to $fastcgi_script_name and $fastcgi_path
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    
    # Check that the PHP script exists before passing it
    try_files $fastcgi_script_name =404;
    
    # Bypass the fact that try_files resets $fastcgi_path_info
    # see: http://trac.nginx.org/nginx/ticket/321
    set $path_info $fastcgi_path_info;
    fastcgi_param PATH_INFO $path_info;
    
    fastcgi_index index.php;
    include fastcgi.conf;
    
    # configuration file /etc/nginx/fastcgi.conf:
    
    fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;
    
    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;
    
    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
    
    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  REMOTE_USER        $remote_user;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;
    
    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;
    
    # configuration file /etc/nginx/globale_domains.conf:
    
    
    
    
    
    server {
        server_name schani.com;
        root /var/www/roundcubemail;
        location /webmail {
            try_files $uri $uri/ @proxy;
        }
        location @proxy {
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_pass unix:/tmp/phpcgi.socket;
        }
    }

Ähnliche Themen

  1. nginx mit eigener config funktioniert nicht
    Von MrFurgy im Forum Linux als Server
    Antworten: 1
    Letzter Beitrag: 19.02.15, 07:39
  2. grub.cfg eintrag für Windows funktioniert nicht
    Von corax2.05 im Forum System installieren und konfigurieren
    Antworten: 1
    Letzter Beitrag: 22.09.13, 15:40
  3. Antworten: 0
    Letzter Beitrag: 03.05.11, 14:50
  4. Root location
    Von rexen im Forum Linux Allgemein
    Antworten: 4
    Letzter Beitrag: 04.12.06, 14:20
  5. SSL nur für location aktivieren?
    Von -=LeoManiac=- im Forum Linux als Server
    Antworten: 5
    Letzter Beitrag: 16.09.06, 19:24

Stichworte

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •