Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem mit .htaccess

Empfohlene Antworten

Veröffentlicht

Hi Leute ich habe hier ein kleines Problem.

Ich möchte ein Verzeichnis im Document-Root, also im htdocs, einer bestimmten IP-Adresse freigeben. Der Rest muss sich authentifizieren.

Meine .htaccess sieht folgendermaßen aus

AuthName "Secret"

    AuthType Basic

    AuthUserFile C:\xampp\htdocs\.htpasswd

    Require valid-user

    Order deny,allow

    Deny from all

    Allow from 192.168.5.

    Satisfy Any

Wenn ich das so mache prüft er garnicht nach der IP-Adresse, die erlaubt ist, sondern verlangt direkt erstmal das Passwort.

AllowOverride in de httpd.conf alle drei auf all gesetzt, neugestartet, imer noch das gleiche Probem. Was mache ich denn falsch?

Allow from 192.168.5.

Die IP-Adresse ist ja auch nicht vollständig.

Allow from 192.168.5. erlaubt alle IPs von 192.168.5.0 - 192.168.5.255

versuchs mal in dieser Reihenfolge:


    Order deny,allow

    Deny from all

    AuthName "Secret"

    AuthUserFile C:\xampp\htdocs\.htpasswd

    AuthType Basic

    Require valid-user

    Allow from 192.168.5.

    Satisfy Any

Gruß

Hi, oh das sehe ich auch jetzt erst..Allerdings habe ich alle möglichen Kombinationen ausprobiert auch 192.168.5 bzw auch nur 192

allerdings wird immer wieder nur das Passwort abgefragt ohne dass die IP mit berücksichtigt wird.

probiert habe ich auch schon folgendes

AuthName "Secret"

    AuthUserFile C:\xampp\htdocs\.htpasswd

    AuthType Basic

    Order deny,allow

    Deny from all

    Satisfy Any

    Allow from 192.168.5

    Require valid-user

    

dies funktioniert auch nicht. Ich probier mal dein vorschlag schepp

mfg

Probiers mal mit

Allow from 192.168.5.0/24

leider klappen eure Vorschläge auch nicht :S

der fragt immer wieder nach dem Password. Und AllowOverride ist auf ALL gesetzt...

Allow from 192.168.5 <- trag hier einmal die IP ein, die du erlauben möchtest.

hab ich auch schon gemacht..leider funktioniert dies auch nicht..vorallem im internet gibts ja zahlreiche tutorials..warum klappt es bei mir nicht:D?

Andere Frage: Läuft das Xampp auf deinem Rechner, von dem du versuchst auf die Seite zuzugreifen?

Was ich vermute ist, dass du praktisch über die Localhost Schiene fährst und somit will er das Passwort haben. Localhost == 127.0.0.1

klar läuft xampp auf der maschine

das ist natürlich nicht auszuschließen, dann probier ich das mal mit localhost aus...

ok das problem lag an localhost bzw 127.0.0.1 ...gut dann wäre das problem gelöst

ein anderes problem wäre, ich kann mit der integrierten security-funktion von xammp eine .htaccess erstellen mit Passwortschutz für die konfigurationsseite von xammp. Wenn ich diese nun erweitere um

order deny,allow

deny from all

allow from localhost

satisfy all

dann wird mir error500 angezeigt, also internal server error..wie und wo kann ich das einstellen, dass die konfigseite von xampp http://localhost/xampp nur von localhost aufgerufen werden kann unszwar mit passwortabfrage?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.