Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

nginx.sample.conf

Zuletzt modifiziert: 02.04.2025, 15:01 - Dateigröße: 2.57 KiB


001  # Sample nginx configuration file for phpBB.
002  # Tested with:
003  # - nginx 0.8.35
004  # - nginx 1.17.7 (mainline)
005  #
006  # Filename: /etc/nginx/sites-available/example.com.conf
007  #
008  # Replace example.com with your own domain name.
009   
010  # If you want to use the X-Accel-Redirect feature,
011  # add the following to your config.php.
012  #
013  #  define('PHPBB_ENABLE_X_ACCEL_REDIRECT', true);
014  #
015  # See http://wiki.nginx.org/XSendfile for the details
016  # on X-Accel-Redirect.
017   
018  # Sample FastCGI server configuration.
019  # Filename: /etc/nginx/conf.d/php.conf
020  #
021  #  upstream php {
022  #      server unix:/run/php-fpm/php-fpm.sock;
023  #  }
024   
025  # Remove www domain prefix.
026  server {
027      listen 80;
028      # IPv6
029      listen [::]:80;
030   
031      # Remove www
032      server_name www.example.com;
033      return 301 $scheme://example.com$request_uri;
034  }
035   
036  # Board configuration.
037  server {
038      listen 80;
039      # IPv6
040      listen [::]:80;
041      server_name example.com;
042      root /path/to/phpbb;
043   
044      # phpBB uses index.htm
045      index index.php index.html index.htm;
046   
047      # Loggers
048      error_log /var/log/nginx/example.com.error.log warn;
049      access_log /var/log/nginx/example.com.access.log;
050   
051      location / {
052          try_files $uri $uri/ @rewriteapp;
053   
054          # Pass the php scripts to FastCGI server specified in upstream declaration.
055          location ~ \.php(/|$) {
056              include fastcgi.conf;
057              fastcgi_split_path_info ^(.+\.php)(/.*)$;
058              fastcgi_param PATH_INFO $fastcgi_path_info;
059              fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
060              fastcgi_param DOCUMENT_ROOT $realpath_root;
061              try_files $uri $uri/ /app.php$is_args$args;
062              fastcgi_pass php;
063          }
064   
065          # Deny access to internal phpbb files.
066          location ~ /(config|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {
067              deny all;
068              # deny was ignored before 0.8.40 for connections over IPv6.
069              # Use internal directive to prohibit access on older versions.
070              internal;
071          }
072      }
073   
074      location @rewriteapp {
075          rewrite ^(.*)$ /app.php/$1 last;
076      }
077   
078      # Correctly pass scripts for installer
079      location /install/ {
080          try_files $uri $uri/ @rewrite_installapp =404;
081   
082          # Pass the php scripts to fastcgi server specified in upstream declaration.
083          location ~ \.php(/|$) {
084              include fastcgi.conf;
085              fastcgi_split_path_info ^(.+\.php)(/.*)$;
086              fastcgi_param PATH_INFO $fastcgi_path_info;
087              fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
088              fastcgi_param DOCUMENT_ROOT $realpath_root;
089              try_files $uri $uri/ /install/app.php$is_args$args =404;
090              fastcgi_pass php;
091          }
092      }
093   
094      location @rewrite_installapp {
095          rewrite ^(.*)$ /install/app.php/$1 last;
096      }
097   
098      # Deny access to version control system directories.
099      location ~ /\.svn|/\.git {
100          deny all;
101          internal;
102      }
103  }
104