Kom ihåg mig?
Home Menu

Menu


Sätta ihop en server, tips?

 
Ämnesverktyg Visningsalternativ
Oläst 2013-05-01, 16:10 #21
MusikMixen MusikMixen är inte uppkopplad
Bara ett inlägg till!
 
Reg.datum: Feb 2008
Inlägg: 1 527
MusikMixen MusikMixen är inte uppkopplad
Bara ett inlägg till!
 
Reg.datum: Feb 2008
Inlägg: 1 527
Hur menar du med riktiga konfigfiler? Att jag skriver in det i själva apache.conf filen?
MusikMixen är inte uppkopplad   Svara med citatSvara med citat
Oläst 2013-05-01, 18:58 #22
linusoleander linusoleander är inte uppkopplad
Medlem
 
Reg.datum: Feb 2010
Inlägg: 234
linusoleander linusoleander är inte uppkopplad
Medlem
 
Reg.datum: Feb 2010
Inlägg: 234
Citat:
Ursprungligen postat av MusikMixen Visa inlägg
Hur menar du med riktiga konfigfiler? Att jag skriver in det i själva apache.conf filen?
Ja, eller domänspecifika konfig-filer som du sedan inkluderar i din apache.conf-fil.

Har själv aldrig riktigt förstått vad man ska med .htaccess-filer till om man ändå har tillgång till apache.conf
linusoleander är inte uppkopplad   Svara med citatSvara med citat
Oläst 2013-05-01, 21:04 #23
pelmereds avatar
pelmered pelmered är inte uppkopplad
Har WN som tidsfördriv
 
Reg.datum: May 2010
Inlägg: 1 342
pelmered pelmered är inte uppkopplad
Har WN som tidsfördriv
pelmereds avatar
 
Reg.datum: May 2010
Inlägg: 1 342
Ja, jag menade precis som linusoleander skrev ovan.

Här har du lite information om varför .htaccess är dåligt och varför Nginx inte har stöd för något liknande:
http://wiki.nginx.org/LikeApache-htaccess
pelmered är inte uppkopplad   Svara med citatSvara med citat
Oläst 2013-05-01, 22:46 #24
MusikMixen MusikMixen är inte uppkopplad
Bara ett inlägg till!
 
Reg.datum: Feb 2008
Inlägg: 1 527
MusikMixen MusikMixen är inte uppkopplad
Bara ett inlägg till!
 
Reg.datum: Feb 2008
Inlägg: 1 527
Så här ser den ut nu:
Kod:
Options +FollowSymLinks

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##
RewriteBase /
RewriteCond %{HTTP_HOST} ^musikmixen.se
RewriteRule (.*) http://www.musikmixen.se/$1 [R=301,L]

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

AddType text/plain txt
AddType audio/mpeg mp3
AddType audio/x-mpegurl m3u
AddType audio/x-ms-wma wma
AddType audio/x-ms-wax wax
AddType video/x-ms-asf asf
AddType video/x-ms-asf asf asx
AddType video/x-ms-wmv wmv
AddType video/x-ms-wvx wvx
AddType video/x-ms-wmx wmx
AddType application/ogg ogm
AddType application/ogg ogg
AddType audio/x-pn-realaudio ram
AddType audio/x-pn-realaudio-plugin rpm
AddType audio/x-pn-realaudio ra
AddType audio/x-pn-realaudio rm
AddType audio/x-scpls pls
Hur sätter man in den i apache config filen?
Länka gärna till en svensk sida som beskriver det om ni inte själva gör det
MusikMixen är inte uppkopplad   Svara med citatSvara med citat
Svara


Aktiva användare som för närvarande tittar på det här ämnet: 1 (0 medlemmar och 1 gäster)
 

Regler för att posta
Du får inte posta nya ämnen
Du får inte posta svar
Du får inte posta bifogade filer
Du får inte redigera dina inlägg

BB-kod är
Smilies är
[IMG]-kod är
HTML-kod är av

Forumhopp


Alla tider är GMT +2. Klockan är nu 12:26.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson
 
Copyright © 2017