It's easy to configurate a Yii2 server site with directory protection:
With using Sub Directory for Yii2, you could set sub-directory path into yii2's config:
It's easy to configurate a Yii2 server site with directory protection:
With using Sub Directory for Yii2, you could set sub-directory path into yii2's config:
| /** | |
| * jQuery iLightBox - Revolutionary Lightbox Plugin | |
| * http://www.ilightbox.net/ | |
| * | |
| * @version: 2.2.3 - June 03, 2017 | |
| * | |
| * @author: Hemn Chawroka | |
| * http://www.iprodev.com/ | |
| * | |
| */ |
| # WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned. | |
| # Docker | |
| sudo apt-get update | |
| sudo apt-get remove docker docker-engine docker.io | |
| sudo apt install docker.io | |
| sudo systemctl start docker | |
| sudo systemctl enable docker | |
| docker --version |
| ############ WordPress #################### | |
| # Disable logging for favicon and robots.txt | |
| location = /favicon.ico { | |
| try_files /favicon.ico @empty; | |
| access_log off; | |
| log_not_found off; | |
| expires max; | |
| } |
| location ~* "(eval\()" { deny all; } | |
| location ~* "(127\.0\.0\.1)" { deny all; } | |
| location ~* "([a-z0-9]{2000})" { deny all; } | |
| location ~* "(javascript\:)(.*)(\;)" { deny all; } | |
| location ~* "(base64_encode)(.*)(\()" { deny all; } | |
| location ~* "(GLOBALS|REQUEST)(=|\[|%)" { deny all; } | |
| location ~* "(<|%3C).*script.*(>|%3)" { deny all; } | |
| location ~ "(\\|\.\.\.|\.\./|~|`|<|>|\|)" { deny all; } | |
| location ~* "(boot\.ini|etc/passwd|self/environ)" { deny all; } | |
| location ~* "(thumbs?(_editor|open)?|tim(thumb)?)\.php" { deny all; } |
| # /dir/ means exclude the root folder /dir | |
| # /dir/* means get the root folder /dir but not the contents | |
| # dir/ means exclude any folder anywhere where the name contains dir/ | |
| # Examples excluded: /dir/, /usr/share/mydir/, /var/spool/dir/ | |
| # /dir means exclude any folder anywhere where the name contains /dir | |
| # Examples excluded: /dir/, /usr/share/directory/, /var/spool/dir/ | |
| # /var/spool/lpd//cf means skip files that start with cf within any folder within /var/spool/lpd | |
| # | |
| # include, + | |
| # exclude, - |
| # Marketing (Sendy) Installation | |
| # | |
| server { | |
| root /var/www/marketing.site.com; | |
| index index.php index.html index.htm; | |
| server_name marketing.site.com; | |
| autoindex off; |
| <?php | |
| // NOTE: verify-purchase has been deprecated and it's best to use the new /author/sale endpoint as documented on http://build.envato.com/ | |
| // created by Envato user wpdreams https://forums.envato.com/t/verify-purchase-class/3526 | |
| // usage example: | |
| $o = EnvatoApi2::verifyPurchase( $purchase_code ); |
| user www-data; | |
| http { | |
| ## | |
| # Basic Settings | |
| ## | |
| sendfile on; | |
| tcp_nopush on; |
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: nginx init.d dash script for Ubuntu or other *nix. | |
| # Description: nginx init.d dash script for Ubuntu or other *nix. | |
| ### END INIT INFO |