-
-
Save mwiemarc/70452c0f6a6978e8c7a6be40f34f0c6f to your computer and use it in GitHub Desktop.
sticky_notes install @ nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://sayakb.github.io/sticky-notes/pages/install/ | |
# https://github.com/sayakb/sticky-notes | |
mkdir /var/www/paste && cd /var/www/paste.domain.tld && git clone https://github.com/sayakb/sticky-notes.git . | |
chown -Rv www-data:www-data /var/www/paste | |
cp stickynotes_nginx.conf /etc/nginx/sites-enabled/paste.domain.tld | |
ln -s /etc/nginx/sites-available/paste.domain.tld /etc/nginx/sites-enabled/. | |
/etc/init.d/nginx reload | |
cd /var/www/paste.domain.tld/app/config | |
mv database.sample.php database.php | |
vim database.php | |
vim app.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/sayakb/sticky-notes | |
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6 | |
root /var/www/paste.domain.tld/public; | |
index index.php; | |
server_name paste.domain.tld; | |
access_log /var/log/nginx/pastebin_access.log; | |
error_log /var/log/nginx/pastebin_error.log; | |
location / { | |
try_files $uri $uri/ =404; | |
# Redirect Trailing Slashes... | |
if (!-d $request_filename) { | |
rewrite ^/(.+)/$ /$1 permanent; | |
} | |
# Handle Front Controller... | |
if (!-e $request_filename) { | |
rewrite ^/(.*)$ /index.php?/$1 last; | |
break; | |
} | |
} | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
try_files $uri =404; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
location ~ /\. { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment