Advertisement
Guest User

Nginx SPDY Compilation Fail

a guest
Jul 25th, 2012
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.09 KB | None | 0 0
  1. # Nginx SPDY Compilation Fail
  2. # -------------------------------
  3.  
  4. NGINX_VERSION='1.3.2'
  5. NGINX_ECHO_MODULE_VERSION='0.39'
  6. sudo mkdir -p /var/log/nginx
  7. sudo mkdir -p /tmp/nginx/{client,proxy,fastcgi,cache}
  8. sudo chown www-data:www-data /tmp/nginx/{client,proxy,fastcgi,cache}
  9. sudo ps -C nginx -o pid='' | xargs sudo kill -9
  10. cd /usr/local/src
  11. sudo wget -O    nginx-$NGINX_ECHO_MODULE_VERSION.tar.gz "https://github.com/agentzh/echo-nginx-module/tarball/v$NGINX_ECHO_MODULE_VERSION"
  12. sudo tar  -zxvf nginx-$NGINX_ECHO_MODULE_VERSION.tar.gz
  13. sudo rm   -fr   nginx-$NGINX_ECHO_MODULE_VERSION.tar.gz
  14. sudo mv agentzh-echo* nginx_echo_module
  15. cd /usr/local/src
  16. sudo wget -O    nginx-$NGINX_VERSION.tar.gz "http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz"
  17. sudo tar  -zxvf nginx-$NGINX_VERSION.tar.gz
  18. sudo rm   -fr   nginx-$NGINX_VERSION.tar.gz
  19. cd              nginx-$NGINX_VERSION
  20. # Apply SPDY
  21. sudo wget -O patch.spdy.txt "http://nginx.org/patches/spdy/patch.spdy.txt"
  22. sudo patch -p0 < patch.spdy.txt
  23. # Remove NginX Version in headers
  24. grep -risl 'Server: nginx' * | xargs sudo sed -i -e 's/Server: nginx/Server: /g'
  25. grep -risl 'server: %V' * | xargs sudo sed -i -e 's/server: %V/server: /g'
  26. sudo make clean
  27. # --with-ld-opt='-ltcmalloc_minimal' is optional, but recommended
  28. sudo ./configure --with-cc-opt='-O3 -unroll2 -march=native' \
  29.                  --with-ld-opt='-ltcmalloc_minimal' \
  30.                  --error-log-path=/var/log/nginx/error.log \
  31.                  --add-module=/usr/local/src/nginx_echo_module \
  32.                  --conf-path=/usr/local/nginx/nginx.conf \
  33.                  --group=www-data \
  34.                  --http-client-body-temp-path=/tmp/nginx/client \
  35.                  --http-fastcgi-temp-path=/tmp/nginx/fastcgi \
  36.                  --http-log-path=/var/log/nginx/access.log \
  37.                  --http-proxy-temp-path=/tmp/nginx/proxy \
  38.                  --lock-path=/var/lock/nginx.lock--prefix=/usr/local/nginx \
  39.                  --pid-path=/var/run/nginx.pid \
  40.                  --user=www-data \
  41.                  --with-http_geoip_module \
  42.                  --with-http_gzip_static_module \
  43.                  --with-http_realip_module \
  44.                  --with-http_ssl_module \
  45.                  --with-http_stub_status_module \
  46.                  --with-ipv6 \
  47.                  --with-http_ssl_module \
  48.                  --without-http_autoindex_module \
  49.                  --without-http_auth_basic_module \
  50.                  --without-http_browser_module \
  51.                  --without-http_empty_gif_module \
  52.                  --without-http_scgi_module \
  53.                  --without-http_split_clients_module \
  54.                  --without-http_ssi_module \
  55.                  --without-http_uwsgi_module \
  56.                  --without-mail_imap_module \
  57.                  --without-mail_pop3_module \
  58.                  --without-mail_smtp_module \
  59.                  && sudo make && sudo make install && cd /usr/local/src
  60. sudo rm -fr nginx-$NGINX_VERSION
  61. sudo rm -fr nginx_echo_module
  62.  
  63. # Compile without SPDY Patch : it works
  64. # Compile with SPDY Patch : it fails, because warnings are managed as errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement