Skip to content

Instantly share code, notes, and snippets.

@jameswomack
Forked from smathy/gzip.conf
Last active December 14, 2015 07:29
Show Gist options
  • Save jameswomack/5051189 to your computer and use it in GitHub Desktop.
Save jameswomack/5051189 to your computer and use it in GitHub Desktop.
Setup for AO
# http://trac.nginx.org/nginx/ticket/94
brew uninstall pcre
mkdir -p ~/Documents/src/pcre_previous
sudo mv /usr/local/lib/libpcre* ~/Documents/src/pcre_previous
gem install passenger
# passenger-config --root => /Library/Ruby/Gems/1.8/gems/passenger-3.0.19
chmod o+x /Library/Ruby/Gems/1.8/gems/passenger-3.0.19
chmod o+x /Library/Ruby/Gems/1.8/gems
chmod o+x /Library/Ruby/Gems/1.8
chmod o+x /Library/Ruby/Gems
chmod o+x /Library/Ruby
chmod o+x /Library
sudo passenger-install-nginx-module
gzip on;
gzip_min_length 1100;
gzip_comp_level 5;
gzip_types text/plain text/css text/javascript text/xml text/json;
user jameswomack www;
worker_processes 1;
events {
worker_connections 1024;
}
http {
charset utf-8;
default_type application/octet-stream;
include mime.types;
include gzip.conf;
include passenger.conf;
upstream servercom {
server 127.0.0.1:9000; # Amco Online
server 127.0.0.1:9001; # SugarCRM
server 127.0.0.1:9002; # Teacher@Home
}
include /Users/jameswomack/Documents/src/AMCO-Online/config/vhost.conf;
}
# vim: set ts=2 ft=nginx:
# sudo /opt/local/lib/mysql5/bin/mysqld_safe --skip-grant-tables &
# mysql5 -u root
flush privileges;
CREATE USER 'root'@'localhost' IDENTIFIED BY 'root'
GRANT ALL ON *.* TO 'root'@'localhost'
update user set Password=PASSWORD('') WHERE User='root';
passenger_root /Library/Ruby/Gems/1.8/gems/passenger-3.0.19;
passenger_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby;
passenger_max_pool_size 16;
passenger_pool_idle_time 0;
# If you get:
# nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
# Use `sudo lsof -i :80` to see what's using that port
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo /opt/nginx/sbin/nginx
# Run PHP on port 9000
/opt/local/bin/php-cgi -b localhost:9000 -c /Users/jameswomack/Documents/src/AMCO-Online/config/php.ini
sudo port deactivate php5-mysql
sudo port deactivate php5-curl
sudo port deactivate php5-wddx
sudo port deactivate php5
sudo port uninstall php5-mysql
sudo port uninstall php5-curl
sudo port uninstall php5-wddx
sudo port uninstall php5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment