Skip to content

Commit

Permalink
Update to v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Jun 29, 2014
1 parent 54df20f commit 7efba69
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
v1.1.0
------
2014-06-30: Version 1.1.0. Based on latest yii2-advanced-app until 30-Jun-2014.
2014-06-30: Version 1.1.0.
- Based on latest yii2-advanced-app until 30-Jun-2014.
- Included .htaccess for backend.


v1.0.0
Expand Down
47 changes: 47 additions & 0 deletions environments/dev/backend/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ----------------------------------------------------------------------
# Adds some security for the Apache server configuration for use with
# yii2-app-practical template.
# @author Kartik Visweswaran <[email protected]>
# @see http://demos.krajee.com/app-practical
# ----------------------------------------------------------------------

# "-Indexes" will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn't allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>


# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
RewriteCond %{SCRIPT_FILENAME} -d
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
</IfModule>


# Block access to backup and source files
# This files may be left by some text/html editors and
# pose a great security danger, when someone can access them
<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

# Increase cookie security
<IfModule php5_module>
php_value session.cookie_httponly true
</IfModule>

# Settings to hide index.php and ensure pretty urls
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php
47 changes: 47 additions & 0 deletions environments/prod/backend/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ----------------------------------------------------------------------
# Adds some security for the Apache server configuration for use with
# yii2-app-practical template.
# @author Kartik Visweswaran <[email protected]>
# @see http://demos.krajee.com/app-practical
# ----------------------------------------------------------------------

# "-Indexes" will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn't allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>


# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
RewriteCond %{SCRIPT_FILENAME} -d
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
</IfModule>


# Block access to backup and source files
# This files may be left by some text/html editors and
# pose a great security danger, when someone can access them
<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

# Increase cookie security
<IfModule php5_module>
php_value session.cookie_httponly true
</IfModule>

# Settings to hide index.php and ensure pretty urls
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

0 comments on commit 7efba69

Please sign in to comment.