Advertisement
Guest User

nginx php5 update

a guest
Aug 16th, 2011
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.50 KB | None | 0 0
  1. # You may add here your
  2. # server {
  3. # ...
  4. # }
  5. # statements for each of your virtual hosts to this file
  6.  
  7. ##
  8. # You should look at the following URL's in order to grasp a solid understanding
  9. # of Nginx configuration files in order to fully unleash the power of Nginx.
  10. # http://wiki.nginx.org/Pitfalls
  11. # http://wiki.nginx.org/QuickStart
  12. # http://wiki.nginx.org/Configuration
  13. #
  14. # Generally, you will want to move this file somewhere, and start with a clean
  15. # file but keep this around for reference. Or just disable in sites-enabled.
  16. #
  17. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  18. ##
  19.  
  20. server {
  21. listen 80; ## listen for ipv4; this line is default and implied
  22. listen [::]:80 default ipv6only=on; ## listen for ipv6
  23.  
  24. root /usr/share/nginx/www;
  25. index index.php index.html index.htm;
  26.  
  27. # Make site accessible from http://localhost/
  28. server_name localhost;
  29.  
  30. location / {
  31. # First attempt to serve request as file, then
  32. # as directory, then fall back to index.html
  33. try_files $uri $uri/ /index.html;
  34. }
  35.  
  36. location /doc {
  37. root /usr/share;
  38. autoindex on;
  39. allow 127.0.0.1;
  40. deny all;
  41. }
  42.  
  43. location /images {
  44. root /usr/share;
  45. autoindex off;
  46. }
  47.  
  48. #error_page 404 /404.html;
  49.  
  50. # redirect server error pages to the static page /50x.html
  51. #
  52. #error_page 500 502 503 504 /50x.html;
  53. location = /50x.html {
  54. root /usr/share/nginx/www;
  55. }
  56.  
  57. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  58. #
  59. #location ~ \.php$ {
  60. # proxy_pass http://127.0.0.1;
  61. #}
  62.  
  63. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  64. #
  65. location ~ \.php$ {
  66. fastcgi_pass 127.0.0.1:9000;
  67. fastcgi_index index.php;
  68. fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
  69. include fastcgi_params;
  70. }
  71.  
  72. # deny access to .htaccess files, if Apache's document root
  73. # concurs with nginx's one
  74. #
  75. location ~ /\.ht {
  76. deny all;
  77. }
  78. }
  79.  
  80.  
  81. # another virtual host using mix of IP-, name-, and port-based configuration
  82. #
  83. #server {
  84. # listen 8000;
  85. # listen somename:8080;
  86. # server_name somename alias another.alias;
  87. # root html;
  88. # index index.html index.htm;
  89. #
  90. # location / {
  91. # try_files $uri $uri/ /index.html;
  92. # }
  93. #}
  94.  
  95.  
  96. # HTTPS server
  97. #
  98. #server {
  99. # listen 443;
  100. # server_name localhost;
  101. #
  102. # root html;
  103. # index index.html index.htm;
  104. #
  105. # ssl on;
  106. # ssl_certificate cert.pem;
  107. # ssl_certificate_key cert.key;
  108. #
  109. # ssl_session_timeout 5m;
  110. #
  111. # ssl_protocols SSLv3 TLSv1;
  112. # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  113. # ssl_prefer_server_ciphers on;
  114. #
  115. # location / {
  116. # try_files $uri $uri/ /index.html;
  117. # }
  118. #}
  119.  
  120. Now updating nginx ..
  121.  
  122.  
  123. Installing package(s) with command apt-get -y install nginx ..
  124.  
  125. Reading package lists...
  126. Building dependency tree...
  127. Reading state information...
  128. The following extra packages will be installed:
  129. libxslt1.1 nginx-common nginx-full
  130. The following NEW packages will be installed:
  131. libxslt1.1 nginx-common nginx-full
  132. The following packages will be upgraded:
  133. nginx
  134. 1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
  135. Need to get 753 kB of archives.
  136. After this operation, 656 kB of additional disk space will be used.
  137. Get:1 http://mirrors.nl.kernel.org/debian/ squeeze/main libxslt1.1 amd64 1.1.26-6 [247 kB]
  138. Get:2 http://packages.dotdeb.org/ stable/all nginx all 1.0.5-1~dotdeb.1 [51.5 kB]
  139. Get:3 http://packages.dotdeb.org/ stable/all nginx-common all 1.0.5-1~dotdeb.1 [61.0 kB]
  140. Get:4 http://packages.dotdeb.org/ stable/all nginx-full amd64 1.0.5-1~dotdeb.1 [393 kB]
  141. Reading changelogs...
  142. Fetched 753 kB in 2s (321 kB/s)
  143. Selecting previously deselected package libxslt1.1.
  144. (Reading database ... 47496 files and directories currently installed.)
  145. Unpacking libxslt1.1 (from .../libxslt1.1_1.1.26-6_amd64.deb) ...
  146. Preparing to replace nginx 0.7.67-3 (using .../nginx_1.0.5-1~dotdeb.1_all.deb) ...
  147. Unpacking replacement nginx ...
  148. dpkg: warning: unable to delete old directory '/var/lib/nginx': Directory not empty
  149. dpkg: warning: unable to delete old directory '/var/log/nginx': Directory not empty
  150. dpkg: warning: unable to delete old directory '/etc/nginx/sites-available': Directory not empty
  151. dpkg: warning: unable to delete old directory '/etc/nginx/sites-enabled': Directory not empty
  152. dpkg: warning: unable to delete old directory '/etc/nginx': Directory not empty
  153. Selecting previously deselected package nginx-common.
  154. Unpacking nginx-common (from .../nginx-common_1.0.5-1~dotdeb.1_all.deb) ...
  155. Selecting previously deselected package nginx-full.
  156. Unpacking nginx-full (from .../nginx-full_1.0.5-1~dotdeb.1_amd64.deb) ...
  157. Processing triggers for man-db ...
  158. Setting up libxslt1.1 (1.1.26-6) ...
  159. Setting up nginx-common (1.0.5-1~dotdeb.1) ...
  160. Installing new version of config file /etc/nginx/koi-utf ...
  161. Installing new version of config file /etc/nginx/koi-win ...
  162.  
  163. Configuration file `/etc/nginx/sites-available/default'
  164. ==> Modified (by you or by a script) since installation.
  165. ==> Package distributor has shipped an updated version.
  166. What would you like to do about it ? Your options are:
  167. Y or I : install the package maintainer's version
  168. N or O : keep your currently-installed version
  169. D : show the differences between the versions
  170. Z : start a shell to examine the situation
  171. The default action is to keep your current version.
  172. *** default (Y/I/N/O/D/Z) [default=N] ? Installing new version of config file /etc/nginx/sites-available/default ...
  173. Installing new version of config file /etc/nginx/fastcgi_params ...
  174. Installing new version of config file /etc/nginx/win-utf ...
  175.  
  176. Configuration file `/etc/nginx/nginx.conf'
  177. ==> Modified (by you or by a script) since installation.
  178. ==> Package distributor has shipped an updated version.
  179. What would you like to do about it ? Your options are:
  180. Y or I : install the package maintainer's version
  181. N or O : keep your currently-installed version
  182. D : show the differences between the versions
  183. Z : start a shell to examine the situation
  184. The default action is to keep your current version.
  185. *** nginx.conf (Y/I/N/O/D/Z) [default=N] ? Installing new version of config file /etc/nginx/nginx.conf ...
  186. Installing new version of config file /etc/nginx/mime.types ...
  187. Installing new version of config file /etc/init.d/nginx ...
  188. Installing new version of config file /etc/logrotate.d/nginx ...
  189. Setting up nginx-full (1.0.5-1~dotdeb.1) ...
  190. Trying a soft restart
  191. PID IS RIGHT
  192. WAITING
  193. QUIT
  194. Setting up nginx (1.0.5-1~dotdeb.1) ...
  195.  
  196. .. install complete.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement