Ich habe Apache/2.4.18 (Win32)
und mysql
lokal auf meinem Windows 7 installiert, ohne xampp
oder dergleichen zu verwenden.
Da ich nur wenig über Apache oder Webserver weiß, erscheint es schwierig mit der Fehlersuche mitzuhalten.
Ich habe versucht, latest bolt version für die lokale Entwicklung/das Testen zu installieren.
Ich habe derzeit ein strucutre wie:Schraubeninstallationsfehler (wahrscheinlich) falscher Ordner
%apache_root%
htdocs
some_project
bolt_project
app
extensions
public
src
var
vendor
.bolt.yml.dist
.gitignore
.htaccess
composer.json.dist
composer.lock.dist
index.php
README.md
Die gegebene .htaccess
Datei wie folgt aussehen außer Kraft gesetzt wurde:
# Set the default handler.
DirectoryIndex index.php index.html index.htm
# Prevent directory listing
Options -Indexes
# Make sure MultiViews is disabled if available.
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<FilesMatch "\.(dist|db|markdown|md|twig|yaml|yml)|(bower|composer|jsdoc|package)\.json$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule cache/ - [F]
# Some servers require the RewriteBase to be set. If so, set to the correct directory.
RewriteBase /bolt_project/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule^./index.php [L]
</IfModule>
FallbackResource /index.php
# set the correct mime type for woff2 font type
# =============================================
# if you don't set your own mimetypes or you aren't using
# HTML5 Boilerplate Server Configs https://github.com/h5bp/server-configs-apache
# then you can uncomment (delete the hash/pound/octothorpe/number symbol)
# the section below:
#<IfModule mod_mime.c>
# AddType application/font-woff2 woff2
#</IfModule>
# Block access to all hidden files and directories. These types of files
# usually contain user preferences and can include private information like,
# for example, the `.git` or `.svn` directories.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
</IfModule>
Auffällig nur die Linien FallbackResource /index.php
und RewriteBase /bolt_project/
wie von der Schraube Troubleshooting 'Outside of the web root' Seite angegeben. Danach bin immer ich noch die Standard-Installation Fehlerseite Schraube, die diese im Wesentlichen bricht:
The current folder is: C:\Apache24\htdocs\bolt_project/.
The best and easiest fix for this, is to configure the webserver to use C:\Apache24\htdocs\bolt_project/public/ as the 'document root'.
Meine Fragen sind:
1) Warum ist es unsicher diese Installation in der htdocs zu halten/‚so Web-Wurzel? (Einfache Antwort ist genug, kann ich später lesen)
2) Ist die. Htaccess-Datei korrekt geschrieben und platziert?
3) Wo, wenn nicht in htdocs/subfolder
würde ich ein solches Projekt platzieren?
'% apache_dir%/htdocs/bolt_project/Scham /'? Ich kann keinen anderen öffentlichen Ordner in meiner Installation finden –
Der letzte ist etwas, das Sie in Ihrer Apache-Konfiguration konfigurieren können, nicht in bolt.yml. – Bopp