Results 1 to 10 of 19
Threaded View
-
8th Dec 2009, 12:14 AM #1OPBannedWebsite's:
Dev-Security.netfuck Apache get the real shit now
FUCK APACHE AND GET THE REAL SHIT
__________________________________________________ _______________
So over the past couple of days ive been playing around with web servers and from my point of this webserver i will teach you how to install today is BY Far better then apache or lighttpd
Apache - uses to much shit that is loading unwanted services
Lighttpd- waste way to much ram aka leaks it
we will be installing Nginx
Why?
well i have find out that
it is by far the best uses less resources and its way faster
You can install these on
Debian, emerge on Gentoo, ports on FreeBSD , and windows
By via Apt-get usually
i will be installing it on ubuntu as thats what i have as my second os on my pc
We will be installing from source
First install these dependency files
Code:sudo aptitude -y install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
Create a directory to store Nginx
Code:mkdir ~/sources
Code:cd ~/sources/
Now we need to download it
Code:wget http://sysoev*****nginx/nginx-0.7.64.tar.gz
Code:tar -zxvf nginx-0.7.64.tar.gz
Code:cd nginx-0.7.64
__________________________________________________ _______________
We will compile it telling it where to install and to include SSL
Code:./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
Code:make sudo make install
Code:sudo /usr/local/sbin/nginx
moving on
Now were going to stop it
Code:sudo kill `cat /usr/local/nginx/logs/nginx.pid`
__________________________________________________ ________________
Now its time to make it start up restart or stop when needed
So now lets create a file
Code:sudo nano /etc/init.d/nginx
Code:#! /bin/sh ### BEGIN INIT INFO # Provides: nginx # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts the nginx web server # Description: starts nginx using start-stop-daemon ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/sbin/nginx NAME=nginx DESC=nginx test -x $DAEMON || exit 0 # Include nginx defaults if available if [ -f /etc/default/nginx ] ; then . /etc/default/nginx fi set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \ --exec $DAEMON echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --pidfile \ /usr/local/nginx/logs/$NAME.pid --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --pidfile \ /usr/local/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; reload) echo -n "Reloading $DESC configuration: " start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \ --exec $DAEMON echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0
Code:sudo chmod +x /etc/init.d/nginx sudo /usr/sbin/update-rc.d -f nginx defaults
now its time to edit the .conf
Code:sudo nano /usr/local/nginx/conf/nginx.conf
and put this in there
Code:user www-data www-data; worker_processes 4; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay off; keepalive_timeout 5; gzip on; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; include /usr/local/nginx/sites-enabled/*;
now its time to create the Virtual Host File and symlinks
The Nginx file structure is fucked up for sites so we need to fix that
First we need to make some new folders
Code:sudo mkdir /usr/local/nginx/sites-available sudo mkdir /usr/local/nginx/sites-enabled
corresponding symlinks which will be referenced by Nginx' config file.
What are VHOST and sysmlinks?
You have one of each per domain, and one of each for the default settings.
The symlink, or symbolic link, references the web server to the virtual host file.
The vhost file is a configuration file. It tells the web server, for example, things like where the web files live or the kind of URI structure you want.
so now we need a default vhost file, and that goes in the sites-available folder
Code:sudo nano /usr/local/nginx/sites-available/default
Code:server { listen 80; server_name localhost; location / { root html; index index.php index.html index.htm; } # redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
and enable it with symlink
Code:sudo ln -s /usr/local/nginx/sites-available/default /usr/local/nginx/sites-enabled/default
Code:sudo /etc/init.d/nginx start
and there you have itWilliam Palmer Reviewed by William Palmer on . fuck Apache get the real shit now FUCK APACHE AND GET THE REAL SHIT _________________________________________________________________ So over the past couple of days ive been playing around with web servers and from my point of this webserver i will teach you how to install today is BY Far better then apache or lighttpd Apache - uses to much shit that is loading unwanted services Lighttpd- waste way to much ram aka leaks it we will be installing Nginx Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Granny Will Beat Anyone In Call Of Duty MW3! "This Is The Real Shit"
By Kw3rLn in forum General DiscussionReplies: 1Last Post: 16th Nov 2011, 05:45 PM -
Server + DDOS + SHIT Host = Cluster Fuck
By EvilGenius in forum Hosting DiscussionReplies: 40Last Post: 3rd Jul 2011, 07:56 AM
themaCreator - create posts from...
Version 3.46 released. Open older version (or...