Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # You may add here your
- # server {
- # ...
- # }
- # statements for each of your virtual hosts to this file
- ##
- # You should look at the following URL's in order to grasp a solid understanding
- # of Nginx configuration files in order to fully unleash the power of Nginx.
- # http://wiki.nginx.org/Pitfalls
- # http://wiki.nginx.org/QuickStart
- # http://wiki.nginx.org/Configuration
- #
- # Generally, you will want to move this file somewhere, and start with a clean
- # file but keep this around for reference. Or just disable in sites-enabled.
- #
- # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
- ##
- server {
- listen 80; ## listen for ipv4; this line is default and implied
- listen [::]:80 default ipv6only=on; ## listen for ipv6
- root /usr/share/nginx/www;
- index index.php index.html index.htm;
- # Make site accessible from http://localhost/
- server_name localhost;
- location / {
- # First attempt to serve request as file, then
- # as directory, then fall back to index.html
- try_files $uri $uri/ /index.html;
- }
- location /doc {
- root /usr/share;
- autoindex on;
- allow 127.0.0.1;
- deny all;
- }
- location /images {
- root /usr/share;
- autoindex off;
- }
- #error_page 404 /404.html;
- # redirect server error pages to the static page /50x.html
- #
- #error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/www;
- }
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
- #
- #location ~ \.php$ {
- # proxy_pass http://127.0.0.1;
- #}
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- location ~ \.php$ {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
- include fastcgi_params;
- }
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- location ~ /\.ht {
- deny all;
- }
- }
- # another virtual host using mix of IP-, name-, and port-based configuration
- #
- #server {
- # listen 8000;
- # listen somename:8080;
- # server_name somename alias another.alias;
- # root html;
- # index index.html index.htm;
- #
- # location / {
- # try_files $uri $uri/ /index.html;
- # }
- #}
- # HTTPS server
- #
- #server {
- # listen 443;
- # server_name localhost;
- #
- # root html;
- # index index.html index.htm;
- #
- # ssl on;
- # ssl_certificate cert.pem;
- # ssl_certificate_key cert.key;
- #
- # ssl_session_timeout 5m;
- #
- # ssl_protocols SSLv3 TLSv1;
- # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
- # ssl_prefer_server_ciphers on;
- #
- # location / {
- # try_files $uri $uri/ /index.html;
- # }
- #}
- Now updating nginx ..
- Installing package(s) with command apt-get -y install nginx ..
- Reading package lists...
- Building dependency tree...
- Reading state information...
- The following extra packages will be installed:
- libxslt1.1 nginx-common nginx-full
- The following NEW packages will be installed:
- libxslt1.1 nginx-common nginx-full
- The following packages will be upgraded:
- nginx
- 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
- Need to get 753 kB of archives.
- After this operation, 656 kB of additional disk space will be used.
- Get:1 http://mirrors.nl.kernel.org/debian/ squeeze/main libxslt1.1 amd64 1.1.26-6 [247 kB]
- Get:2 http://packages.dotdeb.org/ stable/all nginx all 1.0.5-1~dotdeb.1 [51.5 kB]
- Get:3 http://packages.dotdeb.org/ stable/all nginx-common all 1.0.5-1~dotdeb.1 [61.0 kB]
- Get:4 http://packages.dotdeb.org/ stable/all nginx-full amd64 1.0.5-1~dotdeb.1 [393 kB]
- Reading changelogs...
- Fetched 753 kB in 2s (321 kB/s)
- Selecting previously deselected package libxslt1.1.
- (Reading database ... 47496 files and directories currently installed.)
- Unpacking libxslt1.1 (from .../libxslt1.1_1.1.26-6_amd64.deb) ...
- Preparing to replace nginx 0.7.67-3 (using .../nginx_1.0.5-1~dotdeb.1_all.deb) ...
- Unpacking replacement nginx ...
- dpkg: warning: unable to delete old directory '/var/lib/nginx': Directory not empty
- dpkg: warning: unable to delete old directory '/var/log/nginx': Directory not empty
- dpkg: warning: unable to delete old directory '/etc/nginx/sites-available': Directory not empty
- dpkg: warning: unable to delete old directory '/etc/nginx/sites-enabled': Directory not empty
- dpkg: warning: unable to delete old directory '/etc/nginx': Directory not empty
- Selecting previously deselected package nginx-common.
- Unpacking nginx-common (from .../nginx-common_1.0.5-1~dotdeb.1_all.deb) ...
- Selecting previously deselected package nginx-full.
- Unpacking nginx-full (from .../nginx-full_1.0.5-1~dotdeb.1_amd64.deb) ...
- Processing triggers for man-db ...
- Setting up libxslt1.1 (1.1.26-6) ...
- Setting up nginx-common (1.0.5-1~dotdeb.1) ...
- Installing new version of config file /etc/nginx/koi-utf ...
- Installing new version of config file /etc/nginx/koi-win ...
- Configuration file `/etc/nginx/sites-available/default'
- ==> Modified (by you or by a script) since installation.
- ==> Package distributor has shipped an updated version.
- What would you like to do about it ? Your options are:
- Y or I : install the package maintainer's version
- N or O : keep your currently-installed version
- D : show the differences between the versions
- Z : start a shell to examine the situation
- The default action is to keep your current version.
- *** default (Y/I/N/O/D/Z) [default=N] ? Installing new version of config file /etc/nginx/sites-available/default ...
- Installing new version of config file /etc/nginx/fastcgi_params ...
- Installing new version of config file /etc/nginx/win-utf ...
- Configuration file `/etc/nginx/nginx.conf'
- ==> Modified (by you or by a script) since installation.
- ==> Package distributor has shipped an updated version.
- What would you like to do about it ? Your options are:
- Y or I : install the package maintainer's version
- N or O : keep your currently-installed version
- D : show the differences between the versions
- Z : start a shell to examine the situation
- The default action is to keep your current version.
- *** nginx.conf (Y/I/N/O/D/Z) [default=N] ? Installing new version of config file /etc/nginx/nginx.conf ...
- Installing new version of config file /etc/nginx/mime.types ...
- Installing new version of config file /etc/init.d/nginx ...
- Installing new version of config file /etc/logrotate.d/nginx ...
- Setting up nginx-full (1.0.5-1~dotdeb.1) ...
- Trying a soft restart
- PID IS RIGHT
- WAITING
- QUIT
- Setting up nginx (1.0.5-1~dotdeb.1) ...
- .. install complete.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement