File: prism-apacheconf.html

package info (click to toggle)
node-prismjs 1.30.0%2Bdfsg%2B~1.26.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,220 kB
  • sloc: javascript: 27,628; makefile: 9; sh: 7; awk: 4
file content (54 lines) | stat: -rw-r--r-- 1,194 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<h2>Comments</h2>
<pre><code># This is a comment
# &lt;VirtualHost *:80>
</code></pre>

<h2>Directives</h2>
<pre><code>&lt;Files .htaccess>
	Order allow,deny
	Deny from all
&lt;/Files>
</code></pre>

<h2>Variables</h2>
<pre><code>RewriteCond %{REQUEST_FILENAME}.php -f</code></pre>

<h2>Regex</h2>
<pre><code>^(.*)$
!^www\.</code></pre>

<h2>Directive flags</h2>
<pre><code>[NC]
[RC=301,L]</code></pre>

<h2>Strings</h2>
<pre><code>AuthName "Fichiers réservés"</code></pre>

<h2>Full example</h2>
<pre><code>## BASIC PASSWORD PROTECTION
AuthType basic
AuthName "prompt"
AuthUserFile /.htpasswd
AuthGroupFile /dev/null
Require valid-user

## ALLOW FROM IP OR VALID PASSWORD
Require valid-user
Allow from 192.168.1.23
Satisfy Any

## PROTECT FILES
Order Allow,Deny
Deny from all

## REQUIRE SUBDOMAIN
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^subdomain\.domain\.tld$ [NC]
RewriteRule ^/(.*)$ http://subdomain.domain.tld/$1 [L,R=301]

ErrorDocument 403 http://www.example.com/logo.gif
ErrorDocument 403 /images/you_bad_hotlinker.gif

## REDIRECT UPLOADS
RewriteCond %{REQUEST_METHOD} ^(PUT|POST)$ [NC]
RewriteRule ^(.*)$ /cgi-bin/form-upload-processor.cgi?p=$1 [L,QSA]</code></pre>