1# Apache settings for HotCRP
2
3# These directives limit how large a paper can be uploaded.
4# post_max_size should be >= upload_max_filesize.
5#php_value upload_max_filesize 15M
6#php_value post_max_size 20M
7
8# Some pages involve a lot of post variables.
9#php_value max_input_vars 4096
10
11# A large memory_limit helps when sending very large zipped files.
12php_value memory_limit 128M
13
14# Turn off the hateful magic_quotes_gpc.
15php_flag magic_quotes_gpc off
16
17# Default to UTF-8 (most scripts will override this with <meta>).
18AddDefaultCharset UTF-8
19
20# Use index.php for directory access.
21DirectoryIndex index.php
22
23# Prevent access to SCM directory, logs, test, README, regardless of case.
24RedirectMatch 403 ^.*/(\.[Gg][Ii][Tt].*|\.[Mm][Yy].*|[Rr][Ee][Aa][Dd][Mm][Ee].*|[Ff][Ii][Ll][Ee][Ss][Tt][Oo][Rr][Ee]|[Dd][Oo][Cc][Ss]|[Cc][Oo][Nn][Ff]|[Cc][Oo][Dd][Ee]|[Ll][Oo][Gg][Ss])($|/.*$)
25
26# Don't use MultiViews, which can conflict with mod_rewrite suffixless URLs.
27Options -MultiViews
28
29# Add .php to suffixless URLs.
30<IfModule mod_rewrite.c>
31RewriteEngine on
32RewriteBase /
33RewriteCond %{REQUEST_FILENAME}.php -f
34RewriteCond %{REQUEST_URI} ^(.*)$
35RewriteRule ^[^/]*$ %1.php [L,NE]
36RewriteCond %{REQUEST_FILENAME}.php -f
37RewriteCond %{REQUEST_URI},,$1,, ^(.*)(.*,,)\2$
38RewriteRule ^[^/]*(/.*)$ %1.php$1 [L,NE]
39</IfModule>
40
41# Uncomment this line to ONLY grant access via https.  Requires mod_ssl.
42#
43# SSLRequireSSL
44
45# HTTP Authentication: To ask the server to authenticate users,
46# uncomment these lines and set $Opt["httpAuthLogin"] in
47# conf/options.php. The $Opt["httpAuthLogin"] value should correspond
48# to your AuthType and AuthName (AuthName is the "realm").
49#
50# AuthType Basic
51# AuthName "HotCRP"
52# AuthUserFile FILENAME
53# Require valid-user
54