-
Notifications
You must be signed in to change notification settings - Fork 9
/
.htaccess
36 lines (22 loc) · 7.57 KB
/
.htaccess
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
# BEGIN Hestia Web Interface
# File Caching
# Header set Cache-Control "max-age=2592000, public"
# Custom Error Documents:
ErrorDocument 400 '<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/style.css" rel="stylesheet"><link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/colors/blue.css" id="theme" rel="stylesheet"><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]--> <section id="wrapper" class="error-page"> <div class="error-box"> <div class="error-body text-center"> <h1 class="text-danger">400</h1> <h3 class="text-uppercase">Page Not Found !</h3><p class="text-muted m-t-30 m-b-30 text-uppercase">Your browser sent an invalid request. Please try again.</p><a href="#" onclick="window.history.go(-1);" class="btn btn-danger btn-rounded waves-effect waves-light m-b-40">Go Back</a> </div></div></section> <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/node-waves/0.7.6/waves.min.js"></script><script>Waves.attach(".button", ["waves-effect"]);Waves.init();</script>'
ErrorDocument 403 '<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/style.css" rel="stylesheet"><link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/colors/blue.css" id="theme" rel="stylesheet"><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]--> <section id="wrapper" class="error-page"> <div class="error-box"> <div class="error-body text-center"> <h1 class="text-info">403</h1> <h3 class="text-uppercase">Forbidden Error</h3><p class="text-muted m-t-30 m-b-30 text-uppercase">You do not have permission to access this file or folder</p><a href="#" onclick="window.history.go(-1);" class="btn btn-info btn-rounded waves-effect waves-light m-b-40">Go Back</a> </div></div></section> <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"><script src="https://cdnjs.cloudflare.com/ajax/libs/node-waves/0.7.6/waves.min.js"></script></script><script>Waves.attach(".button", ["waves-effect"]);Waves.init();</script>'
ErrorDocument 404 '<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/style.css" rel="stylesheet"><link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/colors/blue.css" id="theme" rel="stylesheet"><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]--> <section id="wrapper" class="error-page"> <div class="error-box"> <div class="error-body text-center"> <h1 class="text-danger">404</h1> <h3 class="text-uppercase">Page Not Found !</h3> <p class="text-muted m-t-30 m-b-30 text-uppercase">The page you are looking for does not exist</p><a href="#" onclick="window.history.go(-1);" class="btn btn-danger btn-rounded waves-effect waves-light m-b-40">Go Back</a> </div></div></section> <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"><script src="https://cdnjs.cloudflare.com/ajax/libs/node-waves/0.7.6/waves.min.js"></script></script><script>Waves.attach(".button", ["waves-effect"]);Waves.init();</script>'
ErrorDocument 500 '<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/style.css" rel="stylesheet"><link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/colors/blue.css" id="theme" rel="stylesheet"><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]--> <section id="wrapper" class="error-page"> <div class="error-box"> <div class="error-body text-center"> <h1>500</h1> <h3 class="text-uppercase">Internal Server Error</h3><p class="text-muted m-t-30 m-b-30 text-uppercase">Please try again later</p><a href="#" onclick="window.history.go(-1);" class="btn btn-info btn-rounded waves-effect waves-light m-b-40">Go Back</a> </div></div></section> <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/node-waves/0.7.6/waves.min.js"></script><script>Waves.attach(".button", ["waves-effect"]);Waves.init();</script>'
ErrorDocument 503 '<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/style.css" rel="stylesheet"><link href="https://cdn.jsdelivr.net/gh/cdgco/HestiaWebInterface@0.1.0-Beta/css/colors/blue.css" id="theme" rel="stylesheet"><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]--> <section id="wrapper" class="error-page"> <div class="error-box"> <div class="error-body text-center"> <h1 class="text-warning">503</h1> <h3 class="text-uppercase ">This site is unavailable or undergoing maintenance</h3><p class="text-muted m-t-30 m-b-30 text-uppercase">Please wait and try again</p><a href="#" onclick="window.history.go(-1);" class="btn btn-info btn-rounded waves-effect waves-light m-b-40">Go Back</a> </div></div></section> <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/node-waves/0.7.6/waves.min.js"></script><script>Waves.attach(".button", ["waves-effect"]);Waves.init();</script>'
# Block access to config file:
<files config.json>
order allow,deny
deny from all
</files>
# Block access to tmp directory (logfiles and config) and includes directory (MySQL login):
RewriteEngine On
RewriteRule (^|/)tmp(/|$) - [F]
RewriteRule (^|/)includes(/|$) - [F]
# END Hestia Web Interface
# Uncomment to enable SSL
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]