mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-27 13:26:20 +00:00
46 lines
1003 B
ApacheConf
46 lines
1003 B
ApacheConf
Options -Indexes
|
|
|
|
php_value session.save_path /var/lib/php/uoj_sessions
|
|
php_value session.gc_maxlifetime 172800
|
|
php_value session.cookie_lifetime 604800
|
|
|
|
php_value post_max_size 1024M
|
|
php_value upload_max_filesize 1024M
|
|
|
|
php_value session.gc_probability 1
|
|
php_value session.gc_divisor 1000
|
|
|
|
php_value date.timezone 'Asia/Shanghai'
|
|
|
|
DirectorySlash Off
|
|
|
|
DirectoryIndex
|
|
|
|
<filesMatch "\.(ico|gif|jpg|png)$">
|
|
ExpiresActive On
|
|
ExpiresDefault "access plus 6 month"
|
|
Header append Cache-Control "public"
|
|
</filesMatch>
|
|
|
|
<filesMatch "\.(css|js)$">
|
|
ExpiresActive On
|
|
ExpiresDefault "access plus 1 week"
|
|
Header append Cache-Control "public"
|
|
</filesMatch>
|
|
|
|
<filesMatch "\.(pdf)$">
|
|
ExpiresActive On
|
|
ExpiresDefault "access plus 1 month"
|
|
Header append Cache-Control "public"
|
|
</filesMatch>
|
|
|
|
RequestHeader append X-Author "Baoshuo ( https://baoshuo.ren )"
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteCond %{QUERY_STRING} ^$
|
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteRule ^ index.php [L]
|