Quantcast
Channel: Server Support Forum
Viewing all articles
Browse latest Browse all 7456

Konvertierung .htaccess zu INGINX

$
0
0
Hallo,

ich habe nun ein Server der eigentlich super läuft nun wollte ich mich an NGINX wagen, auch das läuft gut, war ja auch nicht schwer nur kämpfe ich mit den .htaccess Dateien.

1.
Code:


# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
# <IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
# </IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,QSA,L]
RewriteRule ^index.html$ / [R=301,L]

RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !(/$)
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://www.android-port.de/$1 [R=301,L]

RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://www.android-port.de/$1 [L]

#RewriteCond %{HTTP_HOST} !^www\.android-port\.de [NC]
#RewriteRule ^(.*)$ http://www.android-port.de/$1 [L,R=301]

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.


# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml) - [NC,L]
RewriteRule (robots\.txt)$ robots.php [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>


2. davon habe ich mehrere an verschiedenen Orten

Code:

<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>
AuthName "xF Installer"
AuthType Basic
AuthUserFile "/var/www/vhosts/android-port.de/httpdocs/install/.htpasswd"
require valid-user

3. auch in verschiedenen Ordnern
Code:

Order deny,allow
Deny from all

Vielleicht hat jemand ein Tipp für mich die meisten converter liefen kein wirklich zufriedenstellendes Ergebnis, einmal bekomme ich keine umleitung auf meine htpps url unter der das Projekt erreichbar sein soll, anderer Seits bekomme ich es nicht hin Ordner oder eine PHP.Datei mit einem Passwortschutz zu versehen.

Vielleicht kann mir das jemand näherbringen.

Viewing all articles
Browse latest Browse all 7456

Trending Articles