Why rewrite URLs? Check Wikipedia
Make sure AllowOverride is on for your directory, or put in httpd.conf
# Apache (.htaccess or httpd.conf)
RewriteEngine On
| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |
Why rewrite URLs? Check Wikipedia
Make sure AllowOverride is on for your directory, or put in httpd.conf
# Apache (.htaccess or httpd.conf)
RewriteEngine On
| ############################################################################### | |
| ## Monit control file | |
| ############################################################################### | |
| ## | |
| ## Comments begin with a '#' and extend through the end of the line. Keywords | |
| ## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
| ## | |
| ## Below you will find examples of some frequently used statements. For | |
| ## information about the control file, a complete list of statements and | |
| ## options please have a look in the monit manual. |
| First, install nginx for mac with "brew install nginx". | |
| Then follow homebrew's instructions to know where the config file is. | |
| 1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
| 2. Copy it somewhere (use full path in the example below for server.* files) | |
| 3. sudo nginx -s reload | |
| 4. Access https://localhost/ | |
| Edit /usr/local/etc/nginx/nginx.conf: |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| #!/bin/sh | |
| # on ubuntu: need some utils & dev libs | |
| sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev | |
| # compile nginx | |
| cd /tmp | |
| curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz | |
| cd nginx* | |
| ./configure --with-http_ssl_module --with-http_dav_module \ |
| set :application, 'Example' # the name of your app | |
| set :location, 'example.com' # server address | |
| set :user, 'deploy' # remote user (unprivileged deployment user) | |
| set :group, 'www-data' # remote group (should be the group your web server runs as) | |
| set :use_sudo, false | |
| set :scm, 'none' | |
| set :deploy_via, :copy | |
| set :repository, '.' | |
| set :deploy_to, '/var/www/example' |