Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:apache

apache

apache ist ein Webserver.

.htaccess

Weiterleitung

Redirect /index.html /me/

.httpasswd erzeugen

Siehe weiter unten…

Proxy-Konfiguration

Unix-Sockets

 
Listen 80
<VirtualHost *:80>
<Location />
    ProxyPass unix:/tmp/helloHTTP.s|http://127.0.0.1/
    ProxyPassReverse unix:/tmp/helloHTTP.s|http://127.0.0.1/
  </Location>
</VirtualHost>

mod_rewrite

http auf http und https auf https

 
RewriteEngine On
 
RewriteCond %{HTTPS} on
RewriteRule ^ - [env=protoc:https]
RewriteCond %{HTTPS} off
RewriteRule ^ - [env=protoc:http]

RewriteCond %{REQUEST_URI} /api/profile/
RewriteRule ^(.*)$ %{ENV:protoc}://whatsee-profile.s3.amazonaws.com/$1 [R,L]

www to non-www

# www to nicht-www
RewriteBase /
RewriteCond %{HTTPS} on
RewriteRule ^ - [env=protoc:https]
RewriteCond %{HTTPS} off
RewriteRule ^ - [env=protoc:http]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ %{ENV:protoc}://%1/$1 [R=301,L]

.httpasswd erzeugen

Passwortdatei generieren

htpasswd -c -b /path/to/.htpasswd username passwort

Beispiel für apache/sites-available/test.conf oder .htaccess

        <location /web-folder>
        AuthType Basic
        AuthName "My Protected Area"
        AuthUserFile /path/to/.htpasswd
        Require valid-user
        </location>

mod_php

.phar-Dateien ausführen

Von Enable .phar handling in your web server

/etc/apache2/mods-enabled/php5.conf öffnen und die Zeile ändern von:

<FilesMatch „.+\.ph(p[345]?|t|tml)$“>

in

<FilesMatch „.+\.ph(ar(|\.bz2|\.gz|\.zip)|p[345]?|t|tml)$“>

Siehe auch

Howtos

linux/apache.txt · Zuletzt geändert: von 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki