Skip to content
This repository has been archived by the owner on Jun 4, 2018. It is now read-only.

Commit

Permalink
Update nginx example, htaccess, Vagrantfile and README
Browse files Browse the repository at this point in the history
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
  • Loading branch information
Scrumplex committed Mar 2, 2018
1 parent a1381f2 commit aecef25
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
10 changes: 9 additions & 1 deletion .htaccess
@@ -1,6 +1,14 @@
<Files ~ "\.inc\.php$">
<Files ~ "\.php$">
deny from all
</Files>

<Files "index\.php">
allow from all
</Files>

<Files "action\.php">
allow from all
</Files>

Options -Indexes
order deny,allow
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -9,13 +9,13 @@
A password manager written in PHP to serve you over the internet.

## Requirements
- MySQL Server (mysql-server, mariadb-server)
- MySQL Server (mysqld, mariadb-server)
- Web Server (nginx / Apache 2 / lighttpd / ...)
- PHP 7.0
- PHP 7.0 openssl module (often included with PHP 7.0)
- PHP 7.0 mysql module
- PHP 7.0 json module
- PHP 7.0 curl module (only needed for ReCaptcha support)
- PHP 7.0-openssl module (often included with PHP 7.0)
- PHP 7.0-mysql module
- PHP 7.0-json module
- PHP 7.0-curl module (only needed for ReCaptcha support)
- [Composer](https://getcomposer.org/download/) (For Ubuntu 16.04 and newer: `apt install composer`)
- [npm](https://docs.npmjs.com/getting-started/installing-node) (For Ubuntu 14.04 and newer: `apt install npm`)
- [Yarn](https://yarnpkg.com) (`npm install -g yarn`)
Expand Down
2 changes: 0 additions & 2 deletions Vagrantfile
Expand Up @@ -15,8 +15,6 @@ Vagrant.configure("2") do |config|

config.vm.provision "shell", inline: <<-SHELL
export DEBIAN_FRONTEND=noninteractive
echo "deb http://packages.dotdeb.org stretch all" > /etc/apt/sources.list.d/dotdeb.list
wget -qO - https://www.dotdeb.org/dotdeb.gpg | apt-key add -
apt-get update
apt-get autoremove -y --purge apache2
apt-get upgrade -y
Expand Down
20 changes: 7 additions & 13 deletions example_nginx.conf → examples/nginx_site.conf
Expand Up @@ -3,35 +3,29 @@ server {
server_name _;

root /var/www/passy;
index index.php index.html index.htm;
index index.php;

location / {
try_files $uri $uri/ /index.php;
try_files $uri $uri/ =404;
}

location /vendor/ {
location ~ /(vendor|src|examples)/ {
deny all;
return 404;
return 403;
}

location /src/ {
location ~ (composer\.json|\.gitignore|gulpfile\.js|\.lock|package\.json|\.md|\.inc\.php|Vagrantfile)$ {
deny all;
return 404;
}

location ~ \.inc\.php$ {
deny all;
return 404;
return 403;
}

location ~ \.php$ {
try_files $uri =404;

fastcgi_split_path_info ^(.+\.php)(/.+)$;

fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_buffer_size 8m;
Expand Down

0 comments on commit aecef25

Please sign in to comment.